I am trying to make an Arduino Uno act as an external programmer for an ATmega32 and ATmega 8. I couldn't succeed, I used connections as given at Using an Arduino as an AVR ISP and Arduino Uno as an ISP programmer and followed the steps.
I used an external 12MHz crystal with the chip to be programmed then I connected XTAL2 of Arduino Uno with XTAL1 of chip to be programmed. The programmer is working but it's not showing the proper device ID. Can anybody help me?
1 Answer 1
Your clock setup sounds very odd. If you have an external crystal already, you should not connect anything but that crystal to the XTAL pins.
There are some different cases of "not showing proper device ID":
- If it shows a sequence of plausible hex digits that just are not the device ID of the device you’re programming, search in avrdude.conf for what device ID they DO represent. Sometimes it’s just a minor variation of the device you thought you had.
- As a special case, if you’re getting the device ID for an ATmega328p, avrdude was actually talking to the MCU in your Arduino, not the target MCU. You need to disable auto-reset on your Arduino.
- If you’re getting a value like
0x00 0x00 0x00
or0xFF 0xFF 0xFF
, your connections are not working properly yet.
-
\$\begingroup\$ i have no used ext crystal,when i wired it with arduino \$\endgroup\$yogece– yogece2013年05月25日 13:19:55 +00:00Commented May 25, 2013 at 13:19
-
\$\begingroup\$ Oh. You wrote above "I used an external 12MHz crystal", but what you meant was that you did not use it during programming. I’m not confident that borrowing the clock of your Arduino this way works. When I use generated clocks, I use a much slower PWM signal. The alternative would be to keep using your external crystal. \$\endgroup\$microtherion– microtherion2013年05月25日 14:58:36 +00:00Commented May 25, 2013 at 14:58
avrdude
\$\endgroup\$