3 serial simultaneous programming

Hello,

I have a board with 4 microntrollers: ATmega2560 as master and 3x ATmega32u4 as slaves.
The master is connected to the slaves through serial connection and has the possibility to reset each of them independently.
The slaves have the same software running.

I made a small design underestimation: I forgot to insert a series resistor to the resetting line.
This means that if I have to program the slaves, I have to re-program the master with a Blinkin led, or whatever is not keeping high the reset lines, and then via ISCP I can program them.

Would be possible, or already exists the possibility to use the ATmega2560 as serial programmer and to program all the three slaves directly?
This means the possibility to automatically change reset-pin and serial port.

Thanks so much

Post a schematic.

i think he's trying to avoid making a hardware change

gcjr:
i think he's trying to avoid making a hardware change

True, but for a software solution one needs to know the hardware :wink:

The 32u4 bootloader normally uses the usb port for programming, not sure if anyone has written a bootloader that uses the serial port. Could you program the atmega2560 to put the ports driving the resets into input mode, or do you need to actively drive the reset lines?

Using the atmega2560 as an ISP programmer for the 32u4's is another possibility.

Sorry for the late reply.

Here you are the concept schematic.
Serial 2 is connected to the slave #1, D8 is connected to the reset line
Serial 3 is connected to the slave #2, D9 is connected to the reset line
Serial 4 is connected to the slave #3, D10 is connected to the reset line

Right, I have already the board, thus it is too late for modifications.

Actually I use a USBasp to program the slaves.
But in order to be able to program them, I have before to install a dummy software (i.e. Blink) in order to avoid that the master is keeping high the reset lines…

Thanks!

david_2018:
The 32u4 bootloader normally uses the usb port for programming, not sure if anyone has written a bootloader that uses the serial port. Could you program the atmega2560 to put the ports driving the resets into input mode, or do you need to actively drive the reset lines?

Using the atmega2560 as an ISP programmer for the 32u4’s is another possibility.

atmega2560 as an ISP programmer for the 32u4’s is not the way, unless I use a SPI bus with all the slaves in series… :s

I would need instead a modified version of the arduino-usbserial for the 2560 which could program the 3 slaves simultaneously.