Pages: [1]   Go Down
Author Topic: Program Gertboard's ATMega328P directly  (Read 1486 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 547
Posts: 27364
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Denmark
Offline Offline
Edison Member
*
Karma: 36
Posts: 1085
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That trick only works if your Atmega328 has a bootloader
Logged

Dallas, TX
Offline Offline
Sr. Member
****
Karma: 10
Posts: 318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 12
Physics teacher with an interest in electronics/computing
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
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,
Martyn
Logged

Pages: [1]   Go Up
Jump to: