I executed the following steps in order to burn a bootloader into an AVR328P-PU chip I acquired on ebay.
I have set up AVR328P-PU on a breadboard as described here: http://arduino.cc/en/main/standalone
I have uploaded the ArduinoISP sketch into Arduion Uno.
Connected the wires in a way described here http://arduino.cc/en/Tutorial/ArduinoToBreadboard ( the setup with external clock)
Chose "Tools -> Programmer -> Arduion as ISP" in the IDE.
Chose "Burn Bootloader" from the IDE.
Got and error
avrdude: Yikes! Invalid device signature.
, noticed that I connected the wires in the wrong order.Fixed the wired, but still got the error:
avrdude: Version 6.0.1
System wide configuration file is "C:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf"
Using Port : COM3
Using Programmer : stk500v1
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 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 : STK500
Description : Atmel STK500 Version 1.x firmware
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.06s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.05s
avrdude: Device signature = 0x000000 (retrying)
Error while burning bootloader.
Reading | ################################################## | 100% 0.07s
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.
Breadboard + Arduino
Breadboard Close-Up
My questions
I understand that this can be caused by poor breadboard quality. How can I test this hypothesis before buying new breadboard?
Could the wrong wiring from step 5 ruin the chip?
-
Did you try setting up a crystal?Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams03/28/2015 13:06:43Commented Mar 28, 2015 at 13:06
-
@Ignacio Yes, I set it up exactly like in step 1.Artium– Artium03/28/2015 13:29:18Commented Mar 28, 2015 at 13:29
-
Direct link to how the setup looks like: arduino.cc/en/uploads/Main/arduinobb_08.jpgArtium– Artium03/28/2015 13:44:43Commented Mar 28, 2015 at 13:44
-
* Are +5v and Gnd carried across the breadboard to both sets of power rails? * In the article you linked, the Arduino provides power to the chip you're trying to program - so why is there a regulator on the breadboard? * If the regulator is the chip's power supply, is its input voltage high enough for it to regulate, and are the grounds of both supplies (the Arduino and your breadboard) board connected to each other? * To your question 2, Maybe yes ... exactly what were the wrongly ordered connections?JRobert– JRobert03/28/2015 14:55:04Commented Mar 28, 2015 at 14:55
-
@JRobert I have uploaded photos of the setup. The regulator is there, but for the bootloader burning, I power the breadboard from the Arduino. The wrongly ordered connection was swapping of the blue and yellow wires (SCK <-> MOSI). Could this ruin the chip?Artium– Artium03/28/2015 16:16:28Commented Mar 28, 2015 at 16:16
2 Answers 2
Being from eBay, I would assume the seller "bricked" the chip beyond his/her capability to fix. Fortunately, you know about stack exchange!
My immediate suggestion is to find, borrow or build a high-voltage programmer. This is a special programmer that can un-brick the chip no matter what's been done to it. The concept is easy, but you need to protect the programmer's pins from the 12v reset signal.
Googling "avr high voltage programmer" gives several useful links. I'll get the actual links when I get back to a real computer.
Ok, so life got in the way, sorry about that. This is the one I built which worked perfectly: MightyOhm
However hooking up the AVR to a "high voltage programmer" is well documented in the data sheets. These should be very much similar circuits on Google.
I had this exact same problem. It turned out that my atmega328p had the wrong fuses. I am not sure how to solve the problem using the default ardiuino ide, however I was able to plug my ArduinoISP into a linux machine (just plug in the usb) and correctly profram the fuses on a slave atmega328p to solve the problem:
The guide here gets you started, however it missing some of the fuses: http://heliosoph.mit-links.info/arduinoisp-reading-writing-fuses-atmega328p/
The full command to set the default fuses is something like this:
avrdude -P /dev/ttyACM0 -b 19200 -c arduino -p m328p -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0x05:m