Does device signature 0x000000 mean the atmega is bad

Go To Last Post
37 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
i have a atmega328p, on which i burnt arduino bootloader using arduino isp. Suddenly it is showing invalid device signature 0x000000, and not at all going away.
Does that mean the atmega is bad or bricked. If not how can i resolve this issue.
Note:
1. With the same setup i was able to burn program on the atmega.
2. With the asme setup i can still burn program on two of my atmega8.
3. I have another atmega8 that never got burnt on the same setup.
4. Using 16mhz xtal with 22pf caps.
5. 10k accross rst and Vcc of target atmega

Is there any safe way to know my device is still alive without burning program.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The lack of a valid ID often means that there is no functioning oscillator in the micro. Even though you have a crystal connected, that does not mean it is oscillating. For example, IF you set fuses for "External Oscillator", that will turn the crystal oscillator off.

To "unbrick" it, you will need to supply an external clock signal to the XTAL1 pin of the micro. You can do this with a mega8.

The safe way to know is to check the XTAL2 pin with an oscilloscope. You will see a 16MHz, "somewhat like a square wave" there if it is running.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As per your response it seems it is just bricked somehow, but not dead. However i did not provide any random lfuse bits. It was set as 0xff. Can it be inadvertently changed?
I dont have a scope, anycan can a digital multimeter help.

Also please let me know if i provide external clock say with other atmega or say 555 clock generator what should be the range of frequency, and what avrdude option needs to be selected.

Can it be anyway a lack of power issue: I am using 9v550 ma with 7805 to convert it to 5v.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One more thing:
I am using arduino as isp program. Can i modify that program to generate pwm signal on some pwm output pin that i can use as external clock.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Can it be anyway a lack of power issue: I am using 9v550 ma with 7805 to convert it to 5v.

It is very unlikely avrs eat less than 100 mA.

Quote:
I am using arduino as isp program. Can i modify that program to generate pwm signal on some pwm output pin that i can use as external clock.

Natively, arduino's pwm are ca 500 Hz : it would be a very slow clock (and modifying a program someone else wrote can lead to trouble linked with misuderstandings). https://www.avrfreaks.net/index.p... uses 1Mhz clocks (supplied by a NE555, or another mcu, or a frequency generator)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dbrion0606 wrote:
It is very unlikely avrs eat less than 100 mA.
What?!?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Of course you can obtain a clock signal from your Arduino.

Just run the modified ArduinoISP sketch from this thread

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I should have written MORE (100 mA is huge for a lonely AVR) -but sometimes less is more than more-

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

david.prentice wrote:
Of course you can obtain a clock signal from your Arduino.

Just run the modified ArduinoISP sketch from this thread

David.


Thanks for your responsese, i was hopeful, but alas; still no luck. I tried with modified arduino isp program, connected arduino pin 3 to xtal1 (pin 9 of target atmega). Also removed the 16m crystal and 22pf caps from pin 9,10. I have 1 atmega8, and atmega328, and both still are giving device signature error, however with this same setup my other atmega8s are working fine. So what should be done now. I am dying to get atleast one success. :cry: Please help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please don't use package pin-numbers. Either use Atmel pin-names e.g. PD2 or Arduino names like Digital#2

Read that thread carefully. It should recover your chip. (unless you have set RSTDISBL fuse)

You can recover from DWEN fuse with an Arduino.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
Please don't use package pin-numbers. Either use Atmel pin-names e.g. PD2 or Arduino names like Digital#2

Read that thread carefully. It should recover your chip. (unless you have set RSTDISBL fuse)

You can recover from DWEN fuse with an Arduino.

David.


David, thanks for your reply. I am actually very new to these things, so would take some time to get familiar with the norms.
I took the clock from Arduino Digital#3, and connected to atmels XTAL#1 pin.
Do I need to left the XTAL#2 pin open. I tried both by keeping it open, and connected to gnd.
Just let me know one thing: if a device is bad what error would come up in avrdude console.
I did not play with the fuses. I just burnt bootloader from arduino ide only, where lfuse was 0xFF. Later i tried to upload program using usb to ttl converetr, and passing rx, tx and gnd to the atmega. I got an error that time. Then i again tried with arduino as isp process to program it; hat time onwards it is giving me device signature error. In this process did i make any inadvertent step to brick the chip.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
You can recover from DWEN fuse with an Arduino.
I'm curious how. I did a brief google search to no avail. Can you provide a procedure, or a link?

JJ

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

debojitk wrote:

David, thanks for your reply. I am actually very new to these things, so would take some time to get familiar with the norms.
I took the clock from Arduino Digital#3, and connected to atmels XTAL#1 pin.
Do I need to left the XTAL#2 pin open. I tried both by keeping it open, and connected to gnd.
Just let me know one thing: if a device is bad what error would come up in avrdude console.
I did not play with the fuses. I just burnt bootloader from arduino ide only, where lfuse was 0xFF. Later i tried to upload program using usb to ttl converetr, and passing rx, tx and gnd to the atmega. I got an error that time. Then i again tried with arduino as isp process to program it; hat time onwards it is giving me device signature error. In this process did i make any inadvertent step to brick the chip.

1. Connect Digital#3 to XTAL1 on target
2. You can either leave the crystal on XTAL2, XTAL1 or leave XTAL2 n/c.
3. Have you got 22pF capacitors? 22nF or 22uF will not work !
4. There are nice photos on Arduino website to show the wiring.
5. And step by step instructions too !

I can understand using a bootloader on a breadboard if you have a good USB->TTL adapter and a good RESET button.

Otherwise, why not just use the ArduinoISP to program your breadboard?

Personally, I would just use the Arduino for development. Why put an AVR on a breadboard? Just put your extra external electronics on the breadboard and control them with the Arduino.

@Joey,

I am sure that I have published an Arduino sketch for exiting DWEN. It is nothing clever. You just bit-bang the debugWIRE "leave dWire" command and then send the regular ISP commands to restore fuses. The sketch means you don't need to change wiring between modes.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi David,

Quote:
Why put an AVR on a breadboard?

The reason i used bootloader is to avoid using arduino as the programmer.

Using -B switch
Somewhere i read that the programming speed should be less than 1/4 of the clock speed of the target. So for 1mhz clock it should be <250khz. This can be achieved with -B switch of avrdude. Can u explain this a little.

As I wrote earlier i did not play with the fuses. I am using following board info for arduino:

uno328.name=Arduino328 standalone
uno328.upload.protocol=arduino
uno328.upload.maximum_size=32256
uno328.upload.speed=115200
uno328.bootloader.low_fuses=0xff
uno328.bootloader.high_fuses=0xde
uno328.bootloader.extended_fuses=0x05
uno328.bootloader.path=optiboot
uno328.bootloader.file=optiboot_atmega328.hex
uno328.bootloader.unlock_bits=0x3F
uno328.bootloader.lock_bits=0x0F
uno328.build.mcu=atmega328p
uno328.build.f_cpu=16000000L
uno328.build.core=arduino
uno328.build.variant=standard

Can the fuses get automatically set to such wrong values.

Quote:

@Joey,

I am sure that I have published an Arduino sketch for exiting DWEN. It is nothing clever. You just bit-bang the debugWIRE "leave dWire" command and then send the regular ISP commands to restore fuses. The sketch means you don't need to change wiring between modes.


I dont understand how dwen issue can be taken care of.

If I get device signature error should i proceed with -F option.

I definitely know you will help me out. Thanks for responding.
Debojit

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Arduino IDE "Burn Bootloader" will do flash, fuses and lockbits. i.e. it is foolproof.
It should work fine with a virgin 1MHz ATmega328P.

Note that you must connect a 16MHz crystal with two 22pF capacitors.

If you are developing a non-UART program on a breadboard, using a regular ISP programmer (like ArduinoISP) is more convenient.

Using a bootloader on a breadboard requires multiple fingers pressing RESET buttons. Whereas using bootloader on the UNO is painless ---- the 'RESET' is done automagically by the DTR capacitor.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks David.
Can u please help me understanding -B switch.
Now i will again do a fresh breadboard wiring, and giving u updates.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I ran the following command:
avrdude -C avrdude.conf -v -v -v -v -p atmega8 -c stk500v1 -P \\.\COM2 -b 19200 -Uhfuse:w:0xdc:m -Ulfuse:w:0xbf:m -F

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 "avrdude.conf"

         Using Port                    : \\.\COM2
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         Setting bit clk period        : 2000.0
         AVR Part                      : ATMEGA8
         Chip Erase delay              : 10000 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         4    20   128    0 no        512    4      0  9000  9000 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           calibration    0     0     0    0 no          4    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.09s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA8 is 1E 93 07
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: erasing chip
avrdude: reading input file "0xdc"
avrdude: writing hfuse (1 bytes):

Writing |                                                    | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.19s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xdc:
avrdude: load data hfuse data from input file 0xdc:
avrdude: input file 0xdc contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.02s

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

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

It is hanged now.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David,
Later I put one of my good mega8 on the same setup:

G:\debojit\electronics project\WinAVR-20100110\bin>avrdude -C avrdude.conf -v -v -p atmega8 -c avrisp -P \\.\COM2 -b 19200

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 "avrdude.conf"

         Using Port                    : \\.\COM2
         Using Programmer              : avrisp
         Overriding Baud Rate          : 19200
         AVR Part                      : ATMEGA8
         Chip Erase delay              : 10000 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         4    20   128    0 no        512    4      0  9000  9000 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           calibration    0     0     0    0 no          4    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.09s

avrdude: Device signature = 0x1e9307
avrdude: safemode: lfuse reads as BF
avrdude: safemode: hfuse reads as DC

avrdude: safemode: lfuse reads as BF
avrdude: safemode: hfuse reads as DC
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

Seems its working. So i think external clock can't recover my chips (1 mega8, 1 mega328). What are your suggestion.

I think i have now to go for hvpp. I am planning to use the one from http://mightyohm.com/blog/2008/09/arduino-based-avr-high-voltage-programmer/
Just let me know if my avrs are atleast live, so that giving it so much effort would bring some meaning to it.

Last Edited: Thu. May 30, 2013 - 08:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
avrdude -C avrdude.conf -v -v -v -v -p atmega8 -c stk500v1 -P \\.\COM2 -b 19200 -Uhfuse:w:0xdc:m -Ulfuse:w:0xbf:m -F

Please don't use -F. It is an open invitation for disaster. Just try a simple 'connect' command e.g.

avrdude -p atmega8 -c stk500v1 -P \\.\COM2 -b 19200 -B5

Drink a nice cup of tea.
Check your wiring again.
Try to connect to a mega8 chip.

Your "-F" might have programmed inappropriate fuses. A neighbour with a STK500 can always do HVPP for you. But I would try the external clock first.

Personally, I always abort with ctrl-C rather than ever trusting avrdude to "Would you like this fuse to be changed back?"

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Drink a nice cup of tea.

Here it is 1:54 am in the night so feeling sleepy.
Quote:
Check your wiring again.

Wiring seems fine as i mentioned other good avrs are responding well.

Quote:
Your "-F" might have programmed inappropriate fuses. A neighbour with a STK500 can always do HVPP for you. But I would try the external clock first.

Personally, I always abort with ctrl-C rather than ever trusting avrdude to "Would you like this fuse to be changed back?"


I understand that -F would not help, and till now never made any magic. I know that if i get invalid device signature -F would do nothing here. I just tried to see if force overwrite happens or not. When i enter Y to the question, the log scrolls, all 3 lights of arduino starts blinking, but i had to abort the process knowing the case that it would not be able to write.

Quote:
I think i have now to go for hvpp. I am planning to use the one from http://mightyohm.com/blog/2008/0...
Just let me know if my avrs are atleast live, so that giving it so much effort would bring some meaning to it.

I dont have any neighbour with a stk500. i am planning to buy a usbasp programmer from ebay
http://www.ebay.com/itm/310525371345?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649
Please suggest.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Of course you have neighbours. There are Avrfreaks in every country.

I would not try to build any hardware. It will cost you more in time, parts and money that mailing your chips to a neighbour. (or even chucking the chips)

The usbasp will do ISP just fine. It does not do HVPP.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi I managed to get another atmega328 from one of my friends.
It is running fine without any issue.

G:\debojit\electronics project\WinAVR-20100110\bin>avrdude -C avrdude.conf -v -v -p atmega328p -c stk500v1 -P \\.\COM2 -b 19200

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 "avrdude.conf"

         Using Port                    : \\.\COM2
         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     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 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.08s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as 7

avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as 7
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

tomorrow i would try hvpp.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

debojitk wrote:

tomorrow i would try hvpp.

hvpp seems not working, may be issue with my 12 v adapter. can u please let me know 9 v would work or not.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No. You require specific voltages for HVPP. e.g. 12V and 4.5V - 5.5V

Regular LVSP (low-voltage-serial-programming) actually generates internal voltages to program the flash. The internal voltage generators can work from 1.8V - 5.5V

So a real 9V is not accurate enough for HVPP. However, most 9V wall-warts actually produce about 12V. Have you measured your "9V" supply?

If you don't want to damage your AVR, use the correct voltages. i.e. use a 15V raw supply to feed a 7812 regulator to produce an accurate and stable 12V.

I still reckon you could recover your chips with an external clock. Or at worst, by mailing the chips to a STK500 owner.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I still reckon you could recover your chips with an external clock. Or at worst, by mailing the chips to a STK500 owner.


David i would have been more than happy if i would have revived the chip with external clock with your modified arduino as isp program.

The 12v supply i am using is not built of regular step down transformer rather it is mobile charger adapter kind of thing. The output was showing as 13 volt, so i used 7812 with a .1uf accross pin 3 and gnd, pin 1 kept as direct input, and pin 2 as gnd, and taking output from pin 3 that shows as 11.96 volt.
As per the instruction given in the mightyohm site i did the following:
1. wireup the arduino and atmega
2. provide the 12v input
3. power up the arduino, the red led goes on.
4. the 1k resistor on the collector of 2n2222 was going little hot as the base was on, and the transistor was flowing current.
5. Now i put the chip and then a little boom; i fond the 12 v power supply is no more supplying. so i opened the psu and found one of the 220v wire is broken.
I think it is a coincidence and nothing to do with plugging the chip and breaking the wire of psu.
Then i tried with my 9 v transformer based one, and it did not help.
I put back the chip on programming mode but is again showing invalid device signature.
So should i go for a transformer based psu, or give it another try.
please suggest.
thanks,
Debojit

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi David,
I tried the hvpp option today, and it also seems to be not working. I tried to fix my bricked chip, it could not, then i tried to change fuse of one of my good chips, it could not. i put my best effort to check if there is any wiring error or so but could not figure out anything.
I used a pc psu as a 12 src.
Can u help me here.
the mightyohm link seems to be very old as there are no post after feb 2011, so seems that blog can't help. u r my last resort who can save me.
Please help.
Thanks,
Debojit

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I forget which country you are in.

Ask for a neighbour with a STK500.

Quote:
Now i put the chip and then a little boom;

You may have already destroyed your chips.
It seems a worthless exercise to check your HVPP hardware if you have already got bad chips.

The mightyohm project probably does work if you build it correctly. This sounds like more work than the price of postage stamps to mail your chips to a neighbour.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hvpp worked :)
i could set fuse of a good atmega8. but with the bad atmega8 the result is same. It could not set the fuse of atmega328p (good/bad).
i added a led on RDY pin of the target avr. For both atmega8 the led goes on, but for the 328p nothing such happens. what i suppose is the arduino program of mightyohm is incapable of setting fuse of atmega328.
My conclusion: hvpp worked, and i chips are dead, but i dont know what wrong step i had taken so that they are gone.
One point here-the bad atmega8 never worked so i thought i was really a bad one, but
the mega328p was working fine but suddenly went bad.
i would try to fix it with the hvpp option if you can send me some sample program to fix the mega328p.
Thanks a lot for all your support.
Debojit

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys, I am programming an ATMEGA328P with AVRISP MK II device in Atmel Studio 6.2.

 

I was able to program the chip once through the steps Tools -> Device Programming -> memories -> press the program button with the appropriate Hex file.

 

But then after programming once, the device ID could not be detected and turned to 0x000000 error ...

 

What happened ?? did I do something wrong that alter or erase the device ID ?? 

 

Could anyone help or advise me on this situation please ?? 
 

Thanks a lot !! 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had a similarly looking problem.  I used Arduino ISP sketch to burn AmForth into another Arduino Nano.  AmForth completely replaces the original Arduino bootloader in the target.  Later when I tried to reburn Arduino bootloader into Nano using the same Arduino ISP, I encountered the 0x000000 signature error.

 

However, when connected to USB, the Forth on the chip was still working normally.  So it appeared to be a ISP programmer (the other Arduino with Arduino ISP sketch) problem, not the target chip problem.

 

I tried a USBasp programmer that I had in one of my drawers and everything worked normally.  Apparently Arduino ISP sketch does not work very well, but I don't know why.

 

Cheers!

Last Edited: Mon. Sep 21, 2015 - 08:26 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The ArduinoISP sketch should work just fine when restoring the bootloader of your Nano.

Upload the ArduinoISP sketch to your UNO.

You must set the "COM" port to the port used by the UNO that is running the ArduinoISP sketch.

You must set the "Board" to Nano (because that is the target)

And connect all the ISP wires to the Nano.   Power the Nano from the UNO.  i.e. disconnect Nano USB.

 

Remember to set the Board type back to UNO.

 

You probably had more "success" with the USBASP because it did not care how you had set your Arduino IDE.   And it comes with a ribbon cable (and 6-pin to 10-pin adapter)

 

David.

Last Edited: Mon. Sep 21, 2015 - 08:42 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear David,

 

The setup I used was exactly the same that I used before to program amforth into the nano.  Not only the same, it was left on the the board as it was, I just disconnected the wires between the Arduino ISP and the nano while I was testing Amforth, and then reconnected the same wires into the very same places.  Maybe you noticed that avrdude actually communicated with the Arduino ISP, so the COM port was correct, etc.

 

I am afraid you have absolutely no idea what you are talking about... Sorry. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK4RM wrote:
I am afraid you have absolutely no idea what you are talking about... Sorry.
An interesting strategy for extracting free help from strangers on the Internet.

 

Good luck with your problem.

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Raving Lunatic,

 

it seems many like writing and only few take the time to actually read :-)  Should I explain in detail here or should we rather talk directly over mail?  No, I will make it short and once for good.

 

I was not asking for help, I just shared my experience how I resolved a problem exhibiting the same symptoms.  I wrote it because my experience was none of the cases described above, so I thought it might be interesting and someone might find it helpful.  Well, if nobody finds that interesting, that's OK, I will bother spending my time writing useless comments to avrfreaks next time.

 

I had to solve, and I did solve my problem on my own because I did not find any real solution here.  And it seems to have been the best way for solving it. Good luck with yours...

 

Henry

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Three fuse bits can brick your AVR.

 

1)  External Clock

 

It requires an external clock, not external crystal.

External clock means another hardware is supplying a square wave of high frequency to pin XTAL1 of the AVR.

If you programmed the External Clock fuse, you will need to have a square wave 100kHz or more (up to 16MHz) to XTAL1 pin, otherwise you will not be able to use or reprogram the AVR.

 

2) Disable RESET Pin

 

The Reset Pin (1) in the AtMega8/.../328 double as PC6 when RESET is disable.

The last programming via serial ISP you can program this fuse to disable RESET and activate the pin as a regular I/O, in this case, PC.6.

Once programmed, you will not be able to reset the chip via pin #1.

As the ISP programming requires to keep the device under reset during all procedure, and RESET is disable, it means the device can no longer be programmed via ISP.

You need to provide a reprogramming via HVPP and parallel mode, to reactivate RESET.

 

3) Disable ISP

 

For some reason you may want to disable programming via ISP, so this fuse can do exactly that.

Once programmed, ISP will not even answer for signature.

To further programming the device, you will need to use HVPP and parallel mode, even to reactivate ISP mode.

 

Yes, I know, it is very easy to do confusion and programming a wrong fuse bit, and have one of the above situation.

But, it is the same as a .45 gun, if you don't know where the side the bullet comes out, you have 50% chance to shoot yourself.

Read, read, read, read.

Wagner Lipnharski
Orlando Florida USA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am not sure how this old thread got resurrected.
.
You can NOT disable SPIEN fuse via regular ISP.
.
The first two points are accurate.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
The first two points are accurate.

Well, I guess.  Setting the fuses for a clock source that is not present will indeed prevent "normal" operations.  But "bricked"?  Provide the clock source that >>you<< said was being used, and continue.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.