Pages: [1]   Go Down
Author Topic: Program AT328 with Leonardo  (Read 576 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

California
Offline Offline
God Member
*****
Karma: 13
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Pages: [1]   Go Up
Jump to: