Go Down

Topic: ArduinoISP not Working (Read 8380 times) previous topic - next topic


I'm trying to use arduinoISP to install a bootloader on a 1284p without much success.

However for repeatability, I have performed the details below using a 328p

ISP Board - Arduino diecimila atmega168
Target Board - Arduino diecimila atmega328p

Arduino IDE 1.0 for macosx
arduinoisp.ino from https://github.com/rsbohn/arduinoisp

1 - Program the ISP board bootloader using usbtinyISP

tools->board->arduino deicimila w/ ATmega 168
tools->burn bootloader

Debug / verbose output http://pastebin.com/QmdKzLVt
This leads to a board with pulsing pin13 LED

2 - Program ISP board with ArduinoISP

Download ArduinoISP.ino from github as above
Open in arduinoIDE
Verify  - output http://pastebin.com/hNLRCR82
Upload - http://pastebin.com/9Z1jasCu

3 - Connect target board to ISP Board.

Connections as per http://arduino.cc/en/uploads/Tutorial/arduinoisp.png

4 - Program targetboard bootloader

tools->board->arduino duelimnova w atmega328
tools->programmer->arduino as isp
tools->burn bootloader

this leads to "Error while loading bootloader" full output here http://pastebin.com/QZEdzBS9

I believe this to be down to the autoreset of the diecimila, adding a 110ohm resistor between 5v and reset on the ISP board, repeating the programming step I now get

Code: [Select]
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega168 -cstk500v1 -P/dev/tty.usbserial-A4001l0H -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x00:m -Uhfuse:w:0xdd:m -Ulfuse:w:0xff:m

avrdude: Version 5.11, compiled on Sep  2 2011 at 18:52:52
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/swp/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbserial-A4001l0H
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

avrdude done.  Thank you.


ArduinoISP use the STK500v1 protocol.  Larger chips (like the 1284p?) require the STK500v2 protocol.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


Could be, but as I can't program an arduino atmega328 using arduinoISP it's not the issue.



avrdude: verification error, first mismatch at byte 0x0000
         0x3f != 0x00

You didn't disable auto-reset on the Arduino running ArduinoISP.  The board was rest and avrdude was talking to the bootloader.  It speaks a variant of STK500v1.  It's happy to say "OK!" when you set the lock bits but always returns 0x00 when reading them back.

Connect a small (1 to 10 microfarad) capacitor between Reset (+) and Ground (-).  This absorbs the reset pulse.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


ok.With a 10uF capacitor between reset and gnd on the programmer. I get the following



That one reports failure due to this:

Code: [Select]

avrdude: Device signature = 0x1e9406

According to that, the chip you're programming onto is a 168 not a 328.


168 is in the arduino board being used as the programmer, 328 is in the target board.


Feb 13, 2012, 10:59 pm Last Edit: Feb 13, 2012, 11:03 pm by Osgeld Reason: 1
Using Programmer              : stk500v1

theres your problem stk500v1 != avrisp

how do you fix it? I dunno I usually get pissed and just do it myself from the command line, or if I dont need a bootloader Ill just add a entry to boards.txt



I'm now really confused.


States 'Use the Burn Bootloader > Arduino as ISP command.'

This implies that either the instructions for arduinoISP are incorrect, OR the arduino IDE isn't doing the correct thing ?


OR the arduino IDE isn't doing the correct thing ?

that would be my guess



Is anyone able to suggest a suitable alternative to using an arduino deicimila to program an 1284p ?


are you just trying to program it or bootload itso you can program it later using a serial connection?


Bootload to allow serial  later.

For info I tried changing the programmer type using avrdude on the command line


Same result.



Feb 14, 2012, 12:42 am Last Edit: Feb 14, 2012, 12:44 am by Osgeld Reason: 1
I share the feeling, I tend to cuss atleast once whenever messing with it

ok so how is the 328 clocked right now? like was it set for a external clock before and its now trying to run on an internal clock?

(also what os are you using, is that linux or mac?)



Arduino IDE 1.0 for macosx

16MHz crystal for the 328 (which is what it was previously)

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131