ICSP via MCU

Hello Friends,

I am designing a board wherein I am trying to program the Atmega32U4(of Leonardo) using a Raspberry Pi. I am new to Atmegas. I understand that we can program them using the ICSP pins (viz - SPI). Can I interface the SPI pins of the Raspberry to the ICSP to program it ? Or am I missing something here ?

Vinod.

Electrically, it should work. I don't know what software you'd use though.

ISP programmers cost about $8: http://www.ebay.com/sch/i.html?_nkw=usbtinyisp

Hello Fungus,

Thank u. My thoughts as well :) So what I intend to do - Raspberry (SPI) -> SPI of Atmega32U4. I will send a steady stream of hex data that will program into the Atmega.

Can I do it using the UART ? Say, using some ISP bootloader ? Something similar to the LPC2124 or so ?

Can my Rx/Tx of the pi be linked to the Tx/Rx of the Arduino to program it ?

Vinod.

vinodkaruvat:
Hello Fungus,

Thank u.
My thoughts as well :slight_smile:
So what I intend to do - Raspberry (SPI) → SPI of Atmega32U4.
I will send a steady stream of hex data that will program into the Atmega.

Can I do it using the UART ? Say, using some ISP bootloader ? Something similar to the
LPC2124 or so ?

Can my Rx/Tx of the pi be linked to the Tx/Rx of the Arduino to program it ?

I don’t know much about Pi programming.

Details of how to program the Mega328 chip over SPI bus are in the datasheet.

You don’t need to use a hardware SPI interface on the transmitter, you can use general I/O pins+software (SPI is just data+clock signals, no exact timing requirements like RS232).

http://kevincuzner.com/2013/05/27/raspberry-pi-as-an-avr-programmer/