Unable to program Pro Mini using Arduino as an ISP, invalid signature

Hi all,

I know there are hundreds of similar posts but I have probably read them all... so I could definitely use some help.

I am trying to program an Arduino Pro Mini 3.3V - 8MHz using my Arduino UNO as an ISP.
I can successfully upload the ArduinoISP sketch, the "heartbeat" LED (pin 9) comes up.

avrdude however can't seem to connect, with this command line

avrdude -p atmega328p -D -b 19200 -P COM7 -c arduino  -v -v -v

I get this error (full output below):

avrdude: Device signature = 0x000000
    avrdude: Yikes!  Invalid device signature.

I have tried

  • 9600 (lowest I've read about)
  • 19200 (the default in ArduinoISP sketch)
  • 56600 (found in boards.txt for the pro mini 3.3v)
  • 115200 (next option in ArduinoISP sketch)

I triple checked my connections:

  • 11/12/13 connected to 11/12/13
  • UNO 10 connected to Pro Mini Rst
  • Pro Mini has its own 3.3V Vcc supply (led was very dim trying to feed from the UNO)
  • All the grounds are connected
  • 10mF capacitor between the UNO's GND and Reset pins

When I run avrdude the "programming" LED (pin 7) comes up briefly once, and that's all.

I am really out of ideas, so any suggestion would be really welcome!

Thanks,
Franck

avrdude -p atmega328p -D -b 19200 -P COM7 -c arduino  -v -v -v

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 "D:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : COM7
         Using Programmer              : arduino
         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
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         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.00s

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


avrdude done.  Thank you.

Try this. When I select arduino as isp I get stk500v1.

avrdude -p atmega328p -D -b 19200 -P COM7 -cstk500v1  -v -v -v

kprims:
Try this. When I select arduino as isp I get stk500v1.

avrdude -p atmega328p -D -b 19200 -P COM7 -cstk500v1  -v -v -v

Same output unfortunately.
Is my understanding correct that since I see the green LED flashing avrdude has successfully talked to the ISP sketch on the UNO? And that as a result I don't need to fool around with Baud rates, which are only used for the serial communication between the computer & the UNO?

I will prepare the second pro mini I have in case I fried something on the first one.
The green led on my 1st pro mini is always solid on, even when I press the reset button...

BTW, should I be concerned that the 5V UNOwill damage the 3.3V pro mini through the SPI connection? Do I need to have voltage dividers to make sure that the UNO pins don't send 5V to the pro mini?

Franck

So it was simply a fried board, I must have messed it up trying to arrange the power supplies on the breadboard.

My second pro mini connects just fine, avrdude reports

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 5

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 5
avrdude: safemode: Fuses OK

For the record, here is what worked for me:

  • UNO 10,11,12 connected to pro mini 10,11,12
  • UNO 9 connected to pro mini RST
  • pro mini powered by a 3.3V breadboard power supply (Vcc + Gnd)
  • UNO GND connected to power supply GND
  • the 10mF capacitor between the UNO's Rst and Gnd pins

I power the UNO, then the pro mini (otherwise the 9/Rst pin is floating and the mini doesn't run).
Using -c stk500v1 and -c avrisp gave the same result with avrdude:

avrdude -p atmega328p -D -b 19200 -P COM7 -cavrisp  -v -v

Moving on to trying to upload sketches :slight_smile:
Franck

So programming is not working so well... basically the sketch seems to upload fine, avrdude reads something back (progress bar), but then it complains that:

Reading | ################################################## | 100% 1.98s

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

I can still read the fuses after that:

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as 5

I can read the flash using avrdude, but I don't see the 0x0c that avrdude is looking for; the first byte is also not the 0x00 that avrdude claimed it read back after programming, so clearly the programming is not working... but I don't know what else to try.

There used to be a preloaded blink test sketch on the pro mini, and it stopped working after the first flash upload attempt, so avrdude did write something...

0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xfe,0x08,0x08,0x09,0x09,0x0a,0x0a,0x0b,0x0b,0x0c,0x0c,0x0d,0x0d,0x0e,0x0e

I wonder is the UNO is properly resetting the pro mini before starting to program, but I don't know how to verify that?

The SPI connection is unreliable, since when simply reading the fuses I sometimes randomly get:

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as 5
avrdude: current erase-rewrite cycle count is -769 (if being tracked)

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: lfuse changed! Was ff, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: hfuse changed! Was df, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: efuse changed! Was 5, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: Fuses OK

Franck

I finally got one good upload using avrdude, after about 50 attempts with various configurations.
In the end what worked was USB power, pro mini power from the UNO, and -c arduino as a programmer (which apparently avoids the need for a capacitor on the UNO reset).

Still very flaky, I will probably look at getting a tinyISP or similar...

Franck