Re: Microcontroller (AVR) programming from smartphone

Liste des GroupesRevenir à e design 
Sujet : Re: Microcontroller (AVR) programming from smartphone
De : blockedofcourse (at) *nospam* foo.invalid (Don Y)
Groupes : sci.electronics.design
Date : 28. Mar 2024, 06:33:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uu2rvq$3c84h$2@dont-email.me>
References : 1 2 3
User-Agent : Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2
On 3/27/2024 12:22 PM, RodionGork wrote:
some control over the MCU-end of the system.  Is this an
OTC "module"?
 I'm not sure what is OTC module.
Over The Counter.  I.e., buying some preexisting module (like an
arduino) instead of designing something WITH an AtMega on it.
In the former, you have some other things that extend the
bare MCU, often that is the limit on what one would want to do
with the hardware.  In the latter, you are likely making your
own module and are free to add whatever additional circuitry
you desire (within size, price, etc. constraints).

AVR microcontrollers were picked as those with probably simplest assembly language, particularly these are bare ATMega8L chips in DIP-28. Initially kids plugged them into breadboard, added battery, couple buttons and LED - and audio-connector of course - and voila (see image linked
Ah, OK.  So, you were neither buying a prebuilt "module" nor
building one of your own.  You have more flexibility in that
the students can add whatever they need to the MCU.  But,
you don't want to burden them with a lot of peripheral
circuitry because that's more work, wiring, likelihood of
mistakes, etc.

above). That was not very stable so we invested 2-3 lessons in building hand-made PCBs.
Then, you COULD add some small amount of "cheap" circuitry to
meet your goal!

Look into the "Kansas City Standard"
 Thanks, I glanced over but need to dive more into details. It also reminded me of approach used with ZX spectrum, need to check how exactly it worked...
 
I would assume you really would like a bidirectional link.
 Well, this would be an improvement though more wiring is needed and audio port with mic input. Shall search for more info how 4-contact jack is implemented on various smartphones... Though if uploading could be made more stable even with one-way link, I'll stick to it for simplicity...
Baseband audio is relatively easy in terms of hardware.  If hardwired,
then even the detection algorithms could be simple.

If every phone supports a microSD card
 Surprising idea! never came to my mind, though I think there is no API to directly control SD card pins and with 8-bit MCU bootloader it is probably not possible to accomodate for complicated code handling SD card IO... And yep, these are perhaps more rare than audio jacks
You store the "compiled" code in a file in a particular place
on the card while in the phone.  Then, bit-bang the interface to
pull the file off the card into the MCU.

The USB charging/data port would be another obvious candidate
 Unless I'm mistaken it works only with phones which have USB "on the go" variety, e.g. can work as USB-host?
That's the most versatile.  But, you may also be able to abuse the
signals and bit-bang an interface.  (I don't know what the phone
API exposes as far as direct control over the i/f)

A BT interface on your MCU module
 We actually did use this previously (HC-05 or something alike), just with somewhat different firmware (also created by me) allowing an interactive BASIC on Arduino or STM32. Here is a lousy video:
 https://www.youtube.com/watch?v=q9JcWGs_VaI
 However setting 15+ cheap bluetooth devices with shaky power supply - they were not working fine
and it was sometimes painful experience. I admit I haven't thought of them for uploading though
it will make straightorward flow. Perhaps shall switch to it if "audio" channel couldn't be
improved after all, thanks :)
 
You can also hack the NFC interface
 Here I'm a bit out of sync with technology - does all modern smartphones include NFC? And I think receiver needs a chip like 531 or 522 and some stuff around so it feels bit too complicated for school level...
NFC would really only work for delivering data *to* the phone.
(sorry, I was lumping all the ideas together without qualifying
their respective abilities).  It's advantage was that it was contactless.
So, any wired interface OUT of the phone could be paired with that
wireless interface back IN.

The (camera) "flash" LED might be easy to drive
 Very curious idea I completely missed, also not sure about throughput but need to go and check first. Also it suggests using camera itself as a feedback... very interesting!
 
you could paint a barcode image on the phones screen
 Ha-ha! that is also something I completely missed. I can easily program "running barcode" in an HTML page with javascript/canvas... Not sure if it will work better than blinking display, but
The advantage is that you can distribute "preprinted programs"
by photocopying onto paper.  A photoreflective sensor could
scan paper images.  Or, the students' phones could take photos
of the pages and "process" them internally.
Note that a barcode can be "folded", regardless of whether it
is scanned by hand or electronically -- scan column one, move
an inch to the right and scan column number two, move...
For longer programs (data blocks), print multiple pages/screens.

it looks much more comprehensive to user... and seems more versatile (even up to printing barcode on a paper) - will think more about this, thanks!
If you transfer the code photographically, there are different
constraints than if you expect the user to manually "scan" it.
Take these into consideration when designing the code's
geometry as it may allow for some simple hackery (e.g., if
a '1' bar/space is twice the width of a '0' bar/space).
Think about distortions introduced by camera held skewed...

Date Sujet#  Auteur
27 Mar 24 * Microcontroller (AVR) programming from smartphone15RodionGork
27 Mar 24 +- Re: Microcontroller (AVR) programming from smartphone1Mike Monett VE3BTI
27 Mar 24 +* Re: Microcontroller (AVR) programming from smartphone6Don Y
27 Mar 24 i`* Re: Microcontroller (AVR) programming from smartphone5RodionGork
28 Mar 24 i +- Re: Microcontroller (AVR) programming from smartphone1Don Y
28 Mar 24 i +- Re: Microcontroller (AVR) programming from smartphone (long; whiners stay away)1Don Y
28 Mar 24 i +- Re: Microcontroller (AVR) programming from smartphone1Don
28 Mar 24 i `- Re: Microcontroller (AVR) programming from smartphone1John Larkin
27 Mar 24 +* Re: Microcontroller (AVR) programming from smartphone3Clive Arthur
27 Mar 24 i+- Re: Microcontroller (AVR) programming from smartphone1Clive Arthur
27 Mar 24 i`- Re: Microcontroller (AVR) programming from smartphone1Clive Arthur
27 Mar 24 +* Re: Microcontroller (AVR) programming from smartphone2piglet
27 Mar 24 i`- Re: Microcontroller (AVR) programming from smartphone1Don
27 Mar 24 +- Re: Microcontroller (AVR) programming from smartphone1Martin Brown
28 Mar 24 `- Re: Microcontroller (AVR) programming from smartphone1KevinJ93

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal