Go Down

Topic: Program AT328 with Leonardo (Read 670 times) previous topic - next topic

Aerovisual

Hi there:

I've serched forum about the topic but couldn't find the exact answer.

What i have is: An ATMega328 with Bootloader UNO, A Leonardo, crystals & caps.

What i wanna do is: Upload the sketches into ATMega via Leonardo. Pretty much like you'd do with an AtTiny.

Is this possible?

Thanks in advance.


tim7

There are 2 ways you could do this:
- Skip the bootloader and run the ArduinoISP sketch on the Leonardo
- Use the Leonardo as an USB-to-serial interface and program the 328 via the bootloader as normal

The second option is probably easier, but entails writing a short sketch for the Leonardo to link Serial and Serial1.

spcomputing


There are 2 ways you could do this:
- Skip the bootloader and run the ArduinoISP sketch on the Leonardo
- Use the Leonardo as an USB-to-serial interface and program the 328 via the bootloader as normal

The second option is probably easier, but entails writing a short sketch for the Leonardo to link Serial and Serial1.


I think option 2 is a little more involve (though I do like the creative solution) such as the bootloader.  If you upload the sketch to the Leonardo, it is going to hit UART0 because of the bootloader and either reprogram the Leonardo or hit UART0 and find that the 32u2 is the wrong chip.  If the bootloader is overwritten, I am not sure the USB2TTL will work.

My vote is option 1, but it will overwrite the bootloader on the Uno.
http://www.spcomputing.com

Go Up