Go Down

Topic: [SOLVED] ArduinoISP programming Atmega8515 on breadboard (Read 4 times) previous topic - next topic


Feb 20, 2012, 07:21 am Last Edit: Mar 14, 2012, 06:10 am by qwertymodo Reason: 1
I'm new to the Arduino and just starting to play around with my Mega 2650r3, but one thing I wanted to try out was the ArduinoISP capability to flash an Atmega8515 for another project I'm working on.  I have the Intel-format .hex file I wish to flash and I know the pinout for hooking it up, and I've have tried following the tutorial's I've found, but I have a feeling that I'm missing something in the configuration for flashing on a breadboard (preferably the barebones setup without additional components on the board).  I can get as far as uploading ArduinoISP to the Mega and then firing up avrdude and initializing the chip, but when I try to flash the actual .hex, it gives me a protocol error.  I'll post any more detailed information that may be necessary, but I'm pretty sure I am missing some basic setup, since most of the tutorials I've found are for programming other chips, so I may be incorrectly configured.  Any pointers would be greatly appreciated.

EDIT: For anyone reading this later for reference, I ended up wiring up the entire circuit shown here http://arduino.cc/en/Tutorial/ArduinoToBreadboard using an external crystal, the barebones layout did NOT work.  I then had to follow this hack http://code.google.com/p/arduino/issues/detail?id=661#c3 to get ArduinoISP to play nice.  Also, to clear up a couple of things that were not quite clear to me as a noob searching aimlessly on the internet, this does require a 100nF (.1uF) cap across RESET and GND on the Arduino inserted AFTER the ArduinoISP sketch has been uploaded but BEFORE uploading the .hex to the 8515, and the 22pF caps on the crystal recommended in the above linked guide worked fine even though my project manual indicated the need for 27's.

Coding Badly


Sorry, I tried it last night and have since disconnected it.  Didn't remember the exact error offhand.  I'll hook it back up and post back.


If it happens to be relevant, using the project documentation I have, this is how it's all connected:

       MEGA || 8515
MISO  50         7
MOSI  51         6
SCK    52         8
SS      53         9
    +5v            40
   GND            20

And here's the output of avrdude:

Code: [Select]
C:\>avrdude -p m8515 -P com7 -c avrisp -b 19200 -U flash:w:gbcf-fw-2.1-usb.hex

avrdude: please define PAGEL and BS2 signals in the configuration file for part
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.14s

avrdude: Device signature = 0x1e9306
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: please define PAGEL and BS2 signals in the configuration file for part
avrdude: reading input file "gbcf-fw-2.1-usb.hex"
avrdude: input file gbcf-fw-2.1-usb.hex auto detected as Intel Hex
avrdude: writing flash (3614 bytes):

Writing |                                                    | 0% 0.00s
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): protocol error

Coding Badly

Go Up