microcontrolleravrfuseavrdude

yikes invalid device signature


i am using arduino isp to program a ATtiny2313 avr microcontroller. Here is the probelm, when i was programming the avr chip using the default fuse values, everything worked just fine. But then, i changed the fuse bytes as i wanted to use an external 16 MHz crystal. When i changed the lfuse value from 0x64 to 0xff (as per the calculation of the fuse bits), the microcontroller stopped responding.

Now everytime i try to program the microcontroller using arduino uno isp, i get an error message : avrdude: Yikes! Invalid device signature. avrdude: Expected signature for ATtiny2313 is 1E 91 0A

and then the fuse bytes shown after verification, very strangely are all set to 0x00 : avrdude: safemode: Fuses OK (H:00, E:00, L:00)

i dont understand what the hell is happening and i have spent hours trying to figure out the probelm.

should the 16Mhz crystal be connected to the microcontroller while programming ?

PLEASE HELP !


Solution

  • Yes. When you change the configuration bits to use the external oscillator, the internal oscillator is no longer utilised - including during programming. The chip is just stuck in reset until it is provided with an external clock signal. When the ISP attempts to read out a value it is just seeing the data line stuck in the reset state - which is where all the 0x00 values are coming from.

    Hook up the crystal or a signal generator to the CLOCKIN pin and you should be able to talk to the chip again.