Arduino as ISP, error programming specific board, thoughts?

Hi folks,

I have an Arduino Uno R3 SMD edition that I'm trying to program with another Arduino Uno. I can successfully program another Arduino Uno SMD with this setup as well as stand-alone atmega238p's, so I know my process is good and the programmer Uno is good. Here's my process:

  1. Upload ArduinoISP sketch to the programmer Uno and hookup proper wires to the target board
  2. Compile arduino blink sketch and get hex file to easy access location
  3. in Windows 7 command prompt in same folder as Blink.hex run: avrdude -P COM5 -b 19200 -c avrisp -p m328p -v -e -U flash:w:Blink.hex

https://lh6.googleusercontent.com/-FZe8WqC5DFg/UrDhEWqPCQI/AAAAAAAAQNI/z0bXW9b9xys/w1155-h866-no/IMG_20131217_163956.jpg

When I plug in this specific target board directly to USB to program it, it is not recognized and doesn't even pop up as a COM port. When I hook it up to the programmer-arduino and run step (3) I get:


avrdude.exe: Version 5.10, compiled on Jan 19 2010 at 10:45:23 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Program Files\WinAVR-20100110 \bin\avrdude.conf"

Using Port : COM5 Using Programmer : avrisp Overriding Baud Rate : 19200 AVR Part : ATMEGA328P 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 1024 4 0 3600 3600 0xff 0xff flash 65 6 128 0 yes 32768 128 256 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 : STK500 Description : Atmel AVR ISP Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

avrdude.exe: Device signature = 0xffffff avrdude.exe: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.

avrdude.exe done. Thank you.


Most notably the last few lines stating " ...Yikes! Invalid device signature..." This same target board does not show up on USB in windows (stated before), as other boards do. This board may have had an over-voltage input on the 5v pin to the tune of 12v, sometime in it's life.

What do you think causes this error message? Could it be a fried atmega328 SMD chip or the USB to serial controller? By not getting success when the atmega328 is programmed directly makes me believe it may be friend and replaceable. Other voltage readings from the regulators and other parts compare positively to my working boards. Thoughts?

By not getting success when the atmega328 is programmed directly makes me believe it may be friend and replaceable.

If you have a solderless breadboard, please try and program it that way. If it programs, the issue is the UNO board. If it does not, it is definitely the uC (state of board is an unknown until you get a new chip - or swap uC).

Ray

Ray,

Thanks for the suggestion. I would have already tried that if this were not an SMD version of the Uno, as stated. If anyone has any suggestions on how to isolate the chip from the Uno and program it, I could test for that.

sk

How did you disable auto-reset on the Uno-acting-as-a-programmer?

I've never had to do that on the Uno's that I've programmed with. If they have the ArduinoISP sketch loaded and I specify the programmer (-p in the command line) it has never been an issue.

To be clear, this programmer programs other atmega's just fine so I don't think it's a DTR issue, unless it's with the target board. I've never seen the "invalid device signature" error before, so I'm not sure what that means. It definitely comes before any DTR signal is sent.

should I try the command line with -F? This makes me a little nervous.

kanurys: I've never had to do that on the Uno's that I've programmed with.

This is the time to try it. 10uF (or higher) capacitor between RESET and GND after uploading the Arduino ISP sketch.

Am I correct in thinking this 10uF cap should go between the DTR line going to the target board and ground?

Here is my attempt with the -F flag. I also tried to reburn the bootloader with similar results. I figured out that the board doesn't even reset when I hit the manual reset button, so I'm thinking the atmega328p is toast. With the capacitor between the reset line and ground or not on it I get the following output from avrdude:

command line entered: avrdude -F -P COM5 -b 19200 -c avrisp -p m328p -v -e -U flash:w:Blink.hex

output from avrdude:

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Program Files\WinAVR-20100110\bin \avrdude.conf"

Using Port : COM5 Using Programmer : avrisp Overriding Baud Rate : 19200 AVR Part : ATMEGA328P 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 Max W ReadBack



eeprom 65 5 4 0 no 1024 4 0 3600 36 00 0xff 0xff flash 65 6 128 0 yes 32768 128 256 4500 45 00 0xff 0xff lfuse 0 0 0 0 no 1 0 0 4500 45 00 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 4500 45 00 0x00 0x00 efuse 0 0 0 0 no 1 0 0 4500 45 00 0x00 0x00 lock 0 0 0 0 no 1 0 0 4500 45 00 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 : STK500 Description : Atmel AVR ISP Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature. avrdude: Expected signature for ATMEGA328P is 1E 95 0F avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: erasing chip avrdude: reading input file "Blink.hex" avrdude: input file Blink.hex auto detected as Intel Hex avrdude: writing flash (1084 bytes):

Writing | ################################################## | 100% 1.35s

avrdude: 1084 bytes of flash written avrdude: verifying flash memory against Blink.hex: avrdude: load data flash data from input file Blink.hex: avrdude: input file Blink.hex auto detected as Intel Hex avrdude: input file Blink.hex contains 1084 bytes avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.99s

avrdude: verifying ... avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x00 avrdude: verification error; content mismatch

avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: safemode: Fuses OK

avrdude done. Thank you.

kanurys: Am I correct in thinking this 10uF cap should go between the DTR line going to the target board and ground?

Between [u]RESET[/u] and [u]GND[/u] on the [u]programmer[/u] after uploading the Arduino ISP sketch.

Ok. I tried it in that config without good results.

It's toast.

yep - with jam and butter.

Also, I just did the loop-back test described here: http://forum.arduino.cc/index.php/topic,73748.0.html

It responds, so I guess the usb chip is good. I'm going to look for an atmega328p-mu. Does anybody know of a good cheap resource for these?

I guess the usb chip is good. I’m going to look for an atmega328p-mu. Does anybody know of a good cheap resource for these?

DigiKey has them for approx $3 but then there is S/H.
Or,
Order an entire Pro Mini for $3.69 if you have hot-air rework station (or toaster oven!)
http://www.ebay.com/itm/Arduino-PRO-MINI-ATMEGA328-5V-16M-MWC-avr328P-Development-Board-/111161265052

FYI: the Pro Mini is a fantastic LCD driver for projects: just attach to rear of parallel LCD with Velcro dots. LCD $3 + ProMini $3.69= Arduino+LCD < $7

Ray

I like that idea^^