Burning atmega328p bootloader in-board (uno)

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Snipeye
 
Posts: 198
Joined: Thu Feb 25, 2010 10:03 am

Burning atmega328p bootloader in-board (uno)

Post by Snipeye »

I was trying to use my uno as an ISP to program a couple of atmega328's I bought (w/o bootloader) from digikey...

Long story short, I managed to brick my uno. Don't judge.

I bought a usbtinyisp, and I'm trying to flash the bootloader back to the uno, but I think I might have set some fuses weird, or...? I really am not sure. It keeps telling me the device signature is 0x000000, so after some reading I'm concluding that the clock is not set up right or something. Descriptive, I know. What do you suggest I attempt? Here's a copy of avrdude output:

Code: Select all

avrdude: Version 6.0.1, compiled on Mar  8 2014 at 13:17:08
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/opt/local/etc/avrdude.conf"
         User configuration file is "/Users/joshuabroekhuijsen/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 029:004
         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    20     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 : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000 (retrying)
avrdude: Device signature = 0x000000 (retrying)
avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATmega328P is 1E 95 0F

avrdude done.  Thank you.
Advice?

EDIT: Update:

I've tried now also with a breadboard'd (hypothetically) clean (as it's right from digikey) ATMega328 (not p) but I also got device signature 0x000000 with that - something is wrong with the communications, and my usbtinyisp can't 'talk' to the chip. I checked each connection with a multimeter, and while I'm not ruling OUT something being wrong with breadboard, I can't find any evidence of it. PS: My usbtinyisp has jumpers in R4 and R7 .

Are there other connections I should check ? I'm getting really frustrated with this. :/

EDIT: UPDATE:

It appears I CAN talk with the chip when I put it into the duemilanove... what are the implications of this? Could I have messed up the little IC near the USB port on the uno?

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Burning atmega328p bootloader in-board (uno)

Post by adafruit_support_mike »

According to this thread in the Arduino forums (http://forum.arduino.cc/index.php/topic,25385.0.html) you can fix the problem by giving avrdude a '-B 8' delay option.

Snipeye
 
Posts: 198
Joined: Thu Feb 25, 2010 10:03 am

Re: Burning atmega328p bootloader in-board (uno)

Post by Snipeye »

I tried a number of things (including the "B8") and they didn't work. What did end up working was flashing the 328p as an uno in the duemilanove board, then moving it back to the uno board - worked find after that. I was also then able to flash the 328's in the uno board, and they operate outside the board meaning the fuses were set right so I don't need an external clock. I did have to update gcc-avr that came with the arduino IDE so it would recognize the 328's rather than 328p, though. (I could have changed the avrdude.conf to see the id ending in 0x14 as a 328p, unlike 0x0F (which it really is) but I wanted both to be working simultaneously.)

All good now, thank you!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”