Go Down

Topic: Program Gertboard's ATMega328P directly (Read 1 time) previous topic - next topic

Jeroen Kransen

I have a Gertboard, an extension board for the Raspberry Pi containing a ATMega328P microcontroller. I found extensive documentation on how to program it from the Pi. But I prefer to program it directly from a Linux or Mac computer. It has no boot loader, so I would need to flash that first from the Arduino IDE. Would this be possible usinga USB-to-Serial converter based on a PL2303 chip? How would I need to wire it?


"Would this be possible usinga USB-to-Serial converter based on a PL2303 chip? "

No. You need to control the pins on the ICSP header - SCK, MISO, MOSI, Reset, and +5, GND.
An AVR ISP programmer is needed for that, or an Arduino programmed to act as one.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Jeroen Kransen

I found a trick somewhere to upload to an Arduino Uno using only UART TX/RX from a PL2303 USB interface: hold the reset button of an Arduino Une for 2-3 seconds starting just before you hit the upload button. It works with an Arduino Uno clone that I have with a defective USB port, and I hoped that a similar trick would be available for the Gertboard. But I already sent my Gertboard back as it was defective, so no way for me to try out. Now that I think of it, I don't think it had a reset button.


That trick only works if your Atmega328 has a bootloader

Papa G

I do all my Arduino IDE programming on a Mac because it is much faster than doing it on the RPi and then sftp it to the RPi for programming the ATmega 328 on the Gertboard. That might be acceptable for you as well. Otherwise, you're probably going to have to put a bootloader on the chip or get an AVR ISP programmer and use avrdude.


Sorry to bring up an old thread. I'm just checking that programming the gertboard like this is possible.  Here's what I propose to do because the spi bus on my pi is in constant use logging data I want to be able to play with the atmega on the gertboard independently.
I have an arduino set up as arduinoISP
My arduino pins are sent to a logic level convertor to get them down to 3V3
I intend to connect the (now 3V3) spi pins to the ICSP pins on the gertboard
I think that this should allow me to use the arduino IDE on my laptop to program the gertboard

Note: I have previously used my pi to program the atmega on the gertboard so does that mean I don't have to install a boot loader?
What model do is select to program the 3V3 atmega328 on the gertboard?
Am I likely to damage things doing this?

Thanks in advance,

Go Up