Hi there,
after a long period of inactivity due to school and other things, I'm back, but running into problems trying to program my Atmega168.
So, I'm using the AVR ISP mkII programmer trying to program an Atmega168, running Ubuntu 9.10, x64.
When I hook up the programmer to my pc, the first LED turns green, when I hook up and switch on my board, the second LED turns green. The problem is thus not in a faulty connection, otherwise the second LED would have lit up orange.
Now, I was trying to read the fuse bits, because I'm using a 20 MHz crystal and first wanted to see how the fuses where set. I used Avrdude and the following command.
sudo avrdude -c avrisp2 -p atmega168 -P usb -U hfuse:r:high.txt -U lfuse:r:low.txt
It then gave me the following error:
avrdude: stk500v2_command(): command failed
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.In addition, the second LED started flashing red as it would when there's a shortcircuit on my board.
(According to a datasheet, it will do so as soon as the current on one of the lines exceeds 25 mA)
I have checked my entire board for short-circuits, but have not found anything.
Using "-F" to override the check didn't help out, it gave me the following result:
avrdude: stk500v2_command(): command failed
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA168 is 1E 94 06
avrdude done. Thank you.
I have tried searching with the use of Google with these error messages and with various combinations of "Ubuntu", "avrdude", "avrisp 2", "atmega168" and the like.
However, I did not come across solutions that were applicable to my situation.
If anyone here would be able to help me with the solution, I would be very grateful.