In this article, we are going to look at a few common error messages we can come across and how to solve them when using the USBasp to program AVR chips with AVRDude.

1. Error Number one : The Device Signature does not match the expected value

You’ve hooked up your USBasp programmer with all of the correct drivers and software, and wired it up to your chip correctly. You type in your AVRDude command to your command prompt and you get the following error:

wrong-id-error

Mismatched Device Signature Error

The good news is, that if the first line ‘Device Signature’ is something other than 0x000000, then it’s an easy fix. (If it does say 0x000000, take a look at errors two and three). If you have a number which is does not match the Expected Signature, it means that you have specified the wrong device to program – ie. the bit after the ‘-p’ in your avrdude call is wrong.

The way to look at this, it to take a magnifying glass, and take a close look at the chip which you are trying to program and write down the full part number. For example is it is an ATMega238P, don’t forget the P ! Then look for it on the following list:

Thing it says on your chip Thing to type after -p
AT32UC3A0512 uc3a0512
AT90CAN128 c128
AT90CAN32 c32
AT90CAN64 c64
AT90PWM2 pwm2
AT90PWM2B pwm2b
AT90PWM3 pwm3
AT90PWM316 pwm316
AT90PWM3B pwm3b
AT90S1200 (****) 1200
AT90S2313 2313
AT90S2333 2333
AT90S2343 (*) 2343
AT90S4414 4414
AT90S4433 4433
AT90S4434 4434
AT90S8515 8515
AT90S8535 8535
AT90USB1286 usb1286
AT90USB1287 usb1287
AT90USB162 usb162
AT90USB646 usb646
AT90USB647 usb647
AT90USB82 usb82
ATmega103 m103
ATmega128 m128
ATmega1280 m1280
ATmega1281 m1281
ATmega1284P m1284p
ATmega1284RFR2 m1284rfr2
ATmega128RFA1 m128rfa1
ATmega128RFR2 m128rfr2
ATmega16 m16
ATmega161 m161
ATmega162 m162
ATmega163 m163
ATmega164P m164p
ATmega168 m168
ATmega168P m168p
ATmega169 m169
ATmega16U2 m16u2
ATmega2560 (**) m2560
ATmega2561 (**) m2561
ATmega2564RFR2 m2564rfr2
ATmega256RFR2 m256rfr2
ATmega32 m32
ATmega324P m324p
ATmega324PA m324pa
ATmega325 m325
ATmega3250 m3250
ATmega328 m328
ATmega328P m328p
ATmega329 m329
ATmega3290 m3290
ATmega3290P m3290p
ATmega329P m329p
ATmega32U2 m32u2
ATmega32U4 m32u4
ATMEGA406 m406
ATmega48 m48
ATmega48P m48p
ATmega64 m64
ATmega640 m640
ATmega644 m644
ATmega644P m644p
ATmega644RFR2 m644rfr2
ATmega645 m645
ATmega6450 m6450
ATmega649 m649
ATmega6490 m6490
ATmega64RFR2 m64rfr2
ATmega8 m8
ATmega8515 m8515
ATmega8535 m8535
ATmega88 m88
ATmega88P m88p
ATmega8U2 m8u2
ATtiny10 t10
ATtiny11 t11
ATtiny12 t12
ATtiny13 t13
ATtiny15 t15
ATtiny1634 t1634
ATtiny20 t20
ATtiny2313 t2313
ATtiny24 t24
ATtiny25 t25
ATtiny26 t26
ATtiny261 t261
ATtiny4 t4
ATtiny40 t40
ATtiny4313 t4313
ATtiny43u t43u
ATtiny44 t44
ATtiny45 t45
ATtiny461 t461
ATtiny5 t5
ATtiny84 t84
ATtiny85 t85
ATtiny861 t861
ATtiny88 t88
ATtiny9 t9
ATxmega128A1 x128a1
ATxmega128A1revD x128a1d
ATxmega128A1U x128a1u
ATxmega128A3 x128a3
ATxmega128A3U x128a3u
ATxmega128A4 x128a4
ATxmega128A4U x128a4u
ATxmega128B1 x128b1
ATxmega128B3 x128b3
ATxmega128C3 x128c3
ATxmega128D3 x128d3
ATxmega128D4 x128d4
ATxmega16A4 x16a4
ATxmega16A4U x16a4u
ATxmega16C4 x16c4
ATxmega16D4 x16d4
ATxmega16E5 x16e5
ATxmega192A1 x192a1
ATxmega192A3 x192a3
ATxmega192A3U x192a3u
ATxmega192C3 x192c3
ATxmega192D3 x192d3
ATxmega256A1 x256a1
ATxmega256A3 x256a3
ATxmega256A3B x256a3b
ATxmega256A3BU x256a3bu
ATxmega256A3U x256a3u
ATxmega256C3 x256c3
ATxmega256D3 x256d3
ATxmega32A4 x32a4
ATxmega32A4U x32a4u
ATxmega32C4 x32c4
ATxmega32D4 x32d4
ATxmega32E5 x32e5
ATxmega384C3 x384c3
ATxmega384D3 x384d3
ATxmega64A1 x64a1
ATxmega64A1U x64a1u
ATxmega64A3 x64a3
ATxmega64A3U x64a3u
ATxmega64A4 x64a4
ATxmega64A4U x64a4u
ATxmega64B1 x64b1
ATxmega64B3 x64b3
ATxmega64C3 x64c3
ATxmega64D3 x64d3
ATxmega64D4 x64d4
ATxmega8E5 x8e5

If you amend the avrdude call accordingly, this should resolve the issue.

2.Error 2 : ‘Programm Enable: Target Doesn’t Answer’

Target Doesn't Answer Error

Target Doesn’t Answer Error

This is a kind of fatal error – nothing seems to be working even though it’s all set up and connected correctly – well, once you have checked your wiring and double checked and triple checked there is one other issue which could be causing this problem. This is the bitclock speed.

If you are trying to program a ‘little chip’ like an ATMega or an ATtiny without an external oscillator the speed at which the program is getting getting transferred to the chip is too fast for it to cope with! As such try adding the bitclock flag (-B) followed by either 4 (-B 4) or 100 (-B 100)  or another speed to see if you can slow the burn speed down. For example we might call :

# avrdude -p m168 -c usbasp -B 4 -U flash:w:prog.hex
There are no comments.

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">