kevinbrugere / mega-isp

Automatically exported from code.google.com/p/mega-isp
0 stars 0 forks source link

Can't program Atmega328: avrdude: Device signature = 0x000000 #29

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to write the Arduino bootloader to a new Atmega328 chip and avrdude 
can't identify the chip.

1. setup programmer with a breadboard like described in 
http://arduino.cc/en/Tutorial/ArduinoISP
2. replace SCK by SCK1, MISO by MISO1, MOSI by MOSI1 and RESET by RESET1 in the 
program because Arduino 1.0 uses tihs names and upload the program to an 
Arduino Decimilia (atmega168)
3. Execute avrdude -C/usr/lib/arduino/hardware/tools/avrdude.conf  -patmega328p 
-cavrisp -P/dev/ttyUSB0 -b19200 
-Uflash:w:/usr/lib/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_at
mega328.hex:i -Ulock:w:0x0F:m

The command result in this: 

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.12s

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.

Any help please?

Original issue reported on code.google.com by alejandr...@gmail.com on 21 Jan 2012 at 10:47

GoogleCodeExporter commented 8 years ago
Forget this. The problem was a bad crystal.

Original comment by alejandr...@gmail.com on 22 Jan 2012 at 11:21

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Me too getting the same problem, and i dont use any crystal with the chip to be 
programmed... Any idea on this?

Original comment by Rapol.Go...@gmail.com on 13 Sep 2012 at 10:32

GoogleCodeExporter commented 8 years ago
If the chip was previously programmed to use external crystal, it may be 
necesary to install the crystal until you change the fuses.

Original comment by alejandr...@gmail.com on 13 Sep 2012 at 10:49

GoogleCodeExporter commented 8 years ago
Also note if you are using MacOS or Linux, you should connect a 10uF capacitor 
between reset and gnd in the bouard you are using as programmer even if it is 
not an arduino UNO.

Original comment by alejandr...@gmail.com on 13 Sep 2012 at 10:53