0
votes

I have atmega1281 and AD-USBISP V03.6
I have compile problem write on flash
problem is

sudo avrdude -p m1281 -P /dev/ttyUSB0 -c stk500v2 -U flash:w:test.hex:i
avrdude: stk500v2_ReceiveMessage(): timeout 
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0xffffff (retrying)
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0xffffff (retrying)
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.
avrdude done.  Thank you.

first problem that I guessed is stk500v2_ReceiveMessage(): timeout
but I don't know how to solve this problem.
How to solve this problem and write test.hex on flash of avr ?

1

1 Answers

0
votes

You can select programmer type with -c option, for USBISP use -c usbasb. So try the following

sudo avrdude -p m1281 -P /dev/ttyUSB0 -c usbasb -U flash:w:test.hex:i

If it fails, add another option -B 10 to set the clock

sudo avrdude -p m1281 -P /dev/ttyUSB0 -B 10 -c usbasb -U flash:w:test.hex:i

Read more information here