Pages: [1] 2   Go Down
Author Topic: ArduinoISP not Working  (Read 2557 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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->programmer->usbtinyISP
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:
/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.




 
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 178
Posts: 8064
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ArduinoISP use the STK500v1 protocol.  Larger chips (like the 1284p?) require the STK500v2 protocol.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

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

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 178
Posts: 8064
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

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

http://pastebin.com/uASZS5tS
Logged

Seattle, WA
Offline Offline
God Member
*****
Karma: 7
Posts: 673
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That one reports failure due to this:

Code:
avrdude: Device signature = 0x1e9406

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


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

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



Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
« Last Edit: February 13, 2012, 05:03:42 pm by Osgeld » Logged


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

Ok.

I'm now really confused.

http://arduino.cc/en/Tutorial/ArduinoISP

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

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

that would be my guess
Logged


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

Ok.

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

Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


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

Bootload to allow serial  later.

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

http://pastebin.com/59K400NP

Same result.

Argggg!
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

« Last Edit: February 13, 2012, 06:44:11 pm by Osgeld » Logged


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

Arduino IDE 1.0 for macosx

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

Logged

Pages: [1] 2   Go Up
Jump to: