Troubleshooting the Beginner Embedded Electronics Tutorial 2

Hi,

I am attempting to teach myself AVR’s, electronics, etc. I am doing the Beginner Embedded Electronics Tutorial #2 from this site - and I’m having issues. When I try to program the AVR using avrdude, it does not work, instead it says “AVR device not responding,” and promptly fails.

I’m running WinXP (I have installed giveio.sys) on a laptop with a parallel port and using the parallel port programmer (stk200) for the AVR, which is an ATMega168.

I do indeed have a 5v power supply hooked up properly. The connections, as far as I can make them out (I’ve checked approximately 25.333 times.), are all correct. The reset pin is pulled high by a 10k resistor and the ISP reset connector is connected on the RESET side of that resistor. I have connected ground to pins 8 and 22 and VCC to pins 7 and 20 on the AVR. I have connected VCC to pin 2 and GND to pins 4,6,8,10 on the ISP connector. MISO and MOSI are not switched around, and SCK and RST are properly connected.

The tutorial with schematics can be found at http://www.sparkfun.com/commerce/tutori … ials_id=93

Am I doing anything wrong and if so, how can I fix it? If I am not doing anything wrong, what’s the problem?

Andrew

hi,

could u post the entire error message from AVRDude. Check all your SPI connections.

I was able to go through this tutorial with my ATMEGA8 and works on the first try :slight_smile: Just make sure your MOSI, etc., are connected correctly.

Hi,

this is the entire error message:

"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"

Thank you,

Andrew

  1. The -p option takes ‘mega168’ not atmega168. For me, i used ‘mega8’.

  2. Definitely sounds like your SPI is not connected correctly. Double check.