Hi all,
This topic is an extension of a previous question I asked(Programming multiple ATMegas from one Arduino/FTDI? - Microcontrollers - Arduino Forum), but I've come up with a plan and I would love some input on if the concept is sound. I am, frankly, still very new to this, and I may be missing some obvious things. This is a combination of a few suggestions I received in the last thread, and some research on various ideas, so I could see me missing something obvious.
My goal is to be able to selectively program multiple MCUs from one USB connection. The inspiration for this idea came from the 16 arduino processor satellite, with supervisor, that was linked to in the last thread.
On the hardware side:
USB runs into ATMega16U2.
ATMega16U2 RX/TX run to the inputs of two demux with latches (I have seen some online, but I would love a recommendation if anyone has one in particular).
Demux run to a "Traffic controller" MCU, as well as all the MCUs to be programmed.
"Traffic controller" is connected to the selectors on both demux chips.
Resets of all MCU's, including "traffic controller" are tied together.
Software side:
- "Traffic controller" MCU selects itself as the output target from the demux chips on start.
- Java program interfaces with serial, allowing communication to the "traffic controller"
- Java program instructs "traffic controller" on which device it wishes to update.
- "Traffic controller" sets demuxes to point to the given device. Serial communication ends with "traffic controller"
- Java program calls AVR dude from command line to upload whatever sketch is to be sent.
- AVR dude updates target MCU.
- On reset, all MCUs receive reset and "traffic controller" boots, triggering it to return to step 1.
Again, I'm new, and this is advanced for me, but is the logic there? Are there corrections that would need to be made? Is there a better way to accomplish this that does not require physical switches?
Thanks!