Go Down

Topic: Using Arduino as ISP — Not able to programme anything (Read 596 times) previous topic - next topic


I'd like to use Arduino as ISP, but it is not working as expect. I have Arduino Uno rev 2, I loaded sketch ArduinoISP from Examples in Arduino IDE v 1.0. Then, I want to program ATMega8U2 on my board (I have my own board with this microcontroller).

I connected pin 10 (Arduino) to reset, 11 to MOSI, 12 to MISO and 13 to clock. Then I connected 5V and GND from Arduino to my board. Now, here is my command I'm using for programming (on Mac):

Code: [Select]
$ avrdude -p at90usb82 -F -P /dev/tty.usbmodem411 \
> -c arduino \
> -U flash:w:UNO-dfu_and_usbserial_combined.hex \
> -U lfuse:w:0xFF:m \
> -U hfuse:w:0xD9:m \
> -U efuse:w:0xF4:m \
> -U lock:w:0x0F:m

Output from avrdude is long, so I put here just some lines:

This one I expected. I'm programming ATMega8u2 and I select AT90USB82.

Code: [Select]
avrdude: Device signature = 0x1e950f
avrdude: Expected signature for AT90USB82 is 1E 93 82

Here, avrdude is telling me the flash memory was saved and verified. But it is not true. After programming, I read flash memory (-U flash:r:flshread:i) and it contains old program. So flash was not programmed!

Code: [Select]
avrdude: verifying ...
avrdude: 7440 bytes of flash verified

Here I get another problem. Avrdude was writing lfuse, but it failed. Why? I don't get it.

Code: [Select]
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xff != 0x00
avrdude: verification error; content mismatch

avrdude: safemode: lfuse changed! Was ff, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: Fuses OK
avrdude: stk500_recv(): programmer is not responding

Am I missing something?


THis line right here has teh problem -

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for AT90USB82 is 1E 93 82

AVR is expecting to get an ID response back of 1E 93 82 and your chip is responding 1E 95 0F.

If you are sure you have everything setup correctly and this is just a newer version of the chip you could add -F to your command telling AVRDudue to ignore the signature and program anyway. It looks like its there...

What version of Arduino IDE did you use to load the ArduinoISP sketch? if you did it with 1.0 there is a bug. Load the ArduinoISP sketch using 0.22 or 0.23. With Arduino-1.0 the ArduinoISP sketch only works at 9600 baud.


As stated in the previous post, ArduinoISP shipped with Arduino 1.0 doesn't work under Arduino 1.0. Either ask Crossroads for a copy of TinyISP (which I can confirm works under Arduino 1.0), or get a copy of the latest ArduinoISP which I am told works under 1.0.

However, it looks like the device signature needs to be patched too.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

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