I’m following along with the SparkFun “Beginning Embedded Electronics” tutorial using the following equipment:
ATMEGA168-20PU purchased locally
AVR-PG1B programmer from SparkFun
I have hooked everything up as shown in the following images:
http://flickr.com/photos/27681363@N08/s … 134384438/
When I try to program the CPU, I get the following error:
> "make.exe" program
avrdude -p atmega168 -P COM1 -c ponyser -v -v -U flash:w:blink_1MHz.hex
avrdude: Version 5.5, compiled on Jun 9 2008 at 14:32:04
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
System wide configuration file is "C:\WinAVR-20080610\bin\avrdude.conf"
Using Port : COM1
Using Programmer : ponyser
AVR Part : ATMEGA168
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 16384 128 128 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : SERBB
Description : design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts
bitbang_cmd(): [ AC 53 00 00 ] [ 00 00 00 00 ]
bitbang_cmd(): [ AC 53 00 00 ] [ 00 00 00 00 ]
bitbang_cmd(): [ AC 53 00 00 ] [ 00 00 00 00 ]
bitbang_cmd(): [ AC 53 00 00 ] [ 00 00 00 00 ]
bitbang_cmd(): [ AC 53 00 00 ] [ 00 00 00 00 ]
[...many more lines of the same snipped...]
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:00
I’ve checked everything I can think of, including:
-
The power supply seems to be working fine. I get 4.98 to 4.99V everywhere between the power rails, and also between, for example, ground and the VCC and AVCC pin on the CPU.
-
Both GND pins on the CPU are connected to ground.
-
The reset pin on the CPU is being pulled high, and measures 4.98V.
-
The ISP connector seems to be hooked up correctly. I even went so far as to measure continuity between the 5x2 connector and the DB-9, and to check the schematic of the AVR-PG1B.
-
If I hook the ISP connector up to my WiTilt, I am able to program it with the “blink_1MHz” program, and it works fine.
-
I substituted a second ATMEGA168-20PU, with no change.
I’m at a bit of a loss to say what’s going wrong. I am using a 12K resistor to pull up the reset pin, instead of 10K, but tried a 1W 10K resistor, just in case, without any change.
I’d appreciate any suggestions you guys can throw out there. I’m inexperienced with embedded processors, and indeed with electronics generally, so it could be I’m just missing something basic. Thanks!
Michael