Trouble with programming an ATmega168

I recently bought the parts for the first two tutorials. I got the first one working easily and after a bit wired up the second one EXACTLY how it says they should be. It also matches the picture of the wiring. When I tried repeatedly the “make program” button in programmers notepad, it always gives the error

> "make.exe" program
avrdude -p atmega168 -P lpt1 -c stk200    -U flash:w:blink_1MHz.hex 

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

make.exe: *** [program] Error 1

> Process Exit Code: 2
> Time Taken: 00:01

It gives this error even after installing giveio.bat AND I’ve tried it on multiple computers. I KNOW that the circuit isn’t shorted because the LED near the end of it turns on. I’ve also checked the resistance in various spots and have confirmed that EXACTLY 5.0v of power goes to the micro. Besides that, I’ve checked the wiring for the 10 pin adapter, and it is all going where it should be. Could anyone suggest what I might be doing wrong? I’ll try to get a picture or two up of the board when I get a chance. (Yes, I realise there are a bunch of similiar topics, but none contained anything that solved my problem.)

EDIT: Here are some pics, they should be high-res enough for you to see where everything is wired. http://e.imagehost.org/view/0113/IMG_0184 The circuit board in general.

http://e.imagehost.org/view/0226/IMG_0187 http://e.imagehost.org/view/0025/IMG_0188 Two closeups of the micro itself and its connections.

I had the same problems, once I found that I didn’t connect power (9v) to the board.

Other times I found the problem by looking over the makefile to make sure that (1) the proper chip (atmega168) was indicated (2) the makefile was looking for the proper file, in my case blink_1MHz without the extension (3) makefile was looking for the proper programmer, in my case STK200. If you enter the wrong programmer, or none, an error message shows up and gives a whole list of accepted programmers.

I learned all this by using SFE’s tutorial

ptoole

striker121:
I’ve tried it on multiple computers.

did you try it on a PC with windows 98? One of my PC’s will not work with givio, no matter what I do.

What I ended up doing is using avreal with a dos boot disk just to get the chip programmed. It can be configured to your cable design. (search google)

(I don’t know if avrdude works in straight dos)

Also you might try supplying your atmega with an oscillator for clock signal. Use whatever you have, usually 4 MHz or less. This way if the CKSEL fuses are messed up, you will be able to restore them.