Another beginner with ATMega AVR programming problems

I’m attempting to program an ATMega168 as described in tutorial 2. I’m using a serial port programmer which I’ve hooked up to my Mac via a USB->Serial adaptor. I’m using avrdude. Essentially, when I run this command:

avrdude -p atmega168 -P /dev/tty.KeySerial1 -cponyser

I get this (apparently popular) message:

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.

This is driving me a bit nuts. I’ve used both my multimeter and a few LEDs to to try to debug this as follows :

(1) I’ve checked the vcc and ground on both the atmega and the ICSP (many, many times) and ensured that the vcc pins are getting 5v.

(2) Checked the pins and connections between the atmega and the ICSP (again, many, many times).

(3) Checked every pixel of the photos in the tutorials against my breadboard.

(4) Tried a few avrdude options like -b9600 and various values with -i

(5) Verified that the reset line from the ICSP goes low when I run the avrdude command, and that the SCK and MOSI lines show some activity. I’m unable to detect any change in signal on pin 18 of the atmega (the MISO line).

(6) Tried different atmega chips in case I happened to get a bad one

(7) Started from scratch (twice)

[8] Used a coworker’s AVR-P28B development board (a pre-built AVR programmer). This yielded the same exactly message.

I’m not sure what to make of this, especially after trying the development board. Am I misusing avrdude? Is my use of a USB-to-Serial adaptor screwing up the process?

Any help or advice would be very much appreciated.

I’ve had the same issue, and seems like I’ve gone through all the same troubleshooting steps as well. I was able to get my chip programmed with a borrowed JTAGICE mkII however, which told me it’s a programmer issue.

Are you using the serial programmer sold on SF? That’s what I bought originally, but have recently noticed that the ATMega168 is not listed under compatible devices. Could one of the more experienced members here please verify that this programmer will not work with the ATMega168?

Has anyone used an AVR ISP mkII to program this chip? They’re fairly inexpensive (~$35) and USB (since it’s harder to come across computers with parallel ports these days), but I wanted to see if anyone had tried running through the tutorials with that programmer.

Thanks.

Serial to USB adapters: I’ve found that the ones that use an FTDI chip and windows driver work well. Cheapies and no-names often don’t.

I’ve found that all the AVRs are compatible with the ISP.

This one is low cost and I use it with AVR Studio (only)

http://www.nkcelectronics.com/avr-jtag- … r-kit.html

and I also use an Atmel USB AVR ISP programmer.