Pages: [1] 2   Go Down
Author Topic: Using an Arduino as an AVR ISP  (Read 13613 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have been having some trouble with my Arduino Duemilanove recently. I have been getting the error:

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

The L led doesn't not blink and my old code is missing. I plan to reinstall the boot loader and I found a how-to guide at the following link:

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

I followed all the steps at this site and i got the following message:

avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

I have double and triple checked the wiring and still nothing. Anyone know if I should do the -F thing?

also, if the -F method seems best, could you please explain to me what it is trying to get me to do?
Logged

Netherlands
Offline Offline
Sr. Member
****
Karma: 1
Posts: 290
(:-)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From my experience the invalid device signature means the chip isn't recognized correctly and the -f isn't going to help.
Which circuit did you use, the one on the breadboard? Because that could probleblt use a couple of decoupling capacitors.
Also keep your wires short.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No. I used two duemilanove boards. Any suggestions?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm exactly in the same situation.  Don't know why, my Duemilanove is working properly, but there is no way to upload new sketches (the L led its like "dimmed" )

I've also tried the Arduino as AVR ISP with Arduino IDE 0018 and ?ve got exactly the same " Double check connections and try again, or use -F to override this check.".

I'll also appreciate any help!

I've use direct breadboard cables to connect both arduinos (wires will be something like 6cm or less)

I haven't tested yet, because I'm using W7 and I guess and going to end up with driver issues,  but I've also seen the "bitbang method" (http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html )  just in case you want to give it a try...

Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The board that you're using as the AVRISP has to have an ATmega328 on it.  (The bootloader on the ATmega168 doesn't time out on errors, and gets confused by the data coming from the computer.)  Also, once you've uploaded the AVRISP sketch to the Arduino you're using as the ISP, you should change the selection in the board menu to the board you're burning the bootloader onto.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Alright. Both boards are AT mega 328s and are both duimilanove boards, same generation.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The similar problem. Arduino Mega with the avrisp.03 sketch. The command line is

avrdude.exe -p m48 -P com5 -c arduino -b 19200 -t

The response is

avrdude.exe: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude.exe: initialization failed, rc=-1;
                   Double check connections and try again, or use -F ...
avrdude.exe: stk500_disable(): protocol error, expect=0x14, resp=0x51

I suppose one of the reasons is that I've connected NOTHING to Arduino, no target MCU at all. But the question is as follow: can I check the avrdude + Arduino as avrisp device WITHOUT target MCU? Or, in other words, what can I check if I've got only Arduino (loaded with the sketch)?

And: can I use Arduino Nano as avrisp?

Thanks!
Logged

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

Quote
-c arduino

try -c avrisp
« Last Edit: August 24, 2010, 03:18:55 pm by Osgeld » Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

2 Osgeld:

Thanks a lot! I changed -c arduino to -c avrisp and the DUDE recognized our Arduino smiley
Don't understand this magic...

Anyway, "AVR device is initialized and ready to accept instructions"

"Invalid device signature" - because of no connections to a target MCU. It's OK so far...
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Don't understand this magic...
-c arduino requests communication through the serial communication line using the bootloader; this was not exactly what you intended :-)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I wouldn't be so sure of it. In AVRDUDE command line description I see, that option

-c programmer-id

have entries:
 
arduino    Arduino board, protocol similar to STK500 1.x

and:

avrisp      Atmel AVR ISP (an alias for stk500)

Does it mean that AVRDUDE considers -c arduino and -c avrisp in a similar way? I think so

But it is not so important now. As my experiments continue, I've found that AVRDUDE doesn't want to identify my Arduino. I've made a comment here:
http://code.google.com/p/mega-isp/issues/detail?id=10

of such a nature:

Arduino Mega. Arduino 018 IDE and avrisp.03 sketch. AVRDUDE ver. 5.10.

No sync:

avrdude -p m48 -P com5 -c avrisp -b 9600

stk500_initialize(): programmer not in sync: resp=0x15

Once or twice they have sync. And, as I see from resp 0x15, they do communicate. More of it, this resp is send when Arduino gets '0' command from the AVRDUDE. And fails to find trailing SPACE.
 
I've tried 120 Ohm resistor. No result. No RESET pulse when AVRDUDE begins it's session, by the way -with or without the resistor.

Can anybody help?

It would be great to monitor the communication between AVRDUDE and Arduino as avrisp. There's something about a log file in

AVR068: STK500 Communication Protocol
(7.3 STK500 Communication Logging)

but I cannot find the right entry in Windows Registry to write LogFilePath...
« Last Edit: August 25, 2010, 11:01:38 am by kyakzcy » Logged

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

try changing -b to 19200

Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've began from this. Then changed to 9600. both in Arduino sketch and in AVRDUDE command line.
Besides, the reported response of Arduino 0x15 shows that communication rate is correct. That code is sent by Arduino as NOSYNC.
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Does it mean that AVRDUDE considers -c arduino and -c avrisp in a similar way? I think so
No it does not. It was just a misinterpretation from your side. The bootloader uses a modified stk500 protocol...  Never mind!
« Last Edit: August 25, 2010, 12:32:52 pm by mpeuser » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, I've got a serial port monitor and STK500 commands description. Will try to solve the problem. Then I will write down the result
Logged

Pages: [1] 2   Go Up
Jump to: