Yikes! Invalid device signature. (Have I screwed my chip?)

Hi All

I am trying to get my attiny2313 programmed.

I have downloaded and installed the files as suggested here

I am using the pololo usb programmer which is great.

I managed to load a simple blink test to my chip, but it was blinking really slowly (5 seconds on delay(1000)=1sec) so I tried loading a bootloader. (When I programmed my 328 someone suggested loading a bootloader would clear the internal oscillator and divide by 8 bit)

Well, that was a mistake :frowning: Now the device is not recognised. Using the -F parameter with avrdude I get the following output.

C:\temp>avrdude.exe -p t2313 -P COM5 -c avrispv2 -e -F -U flash:w:BlinkTest.cpp.hex

avrdude.exe: stk500v2_command(): command failed
avrdude.exe: stk500v2_command(): unknown status 0xc9
avrdude.exe: stk500v2_program_enable(): cannot get connection status
avrdude.exe: initialization failed, rc=-1
avrdude.exe: AVR device initialized and ready to accept instructions
avrdude.exe: Device signature = 0x000000
avrdude.exe: Yikes!  Invalid device signature.
avrdude.exe: Expected signature for ATtiny2313 is 1E 91 0A

avrdude.exe done.  Thank you.

Erm... somehow I messed up my device signature. I cannot erase the chip nor can I load a file using avrdude or the arduino IDE.

Is there any way to fix the chip or have I screwed it?

Also, how would I go about clearing the divide by 8 bit and also how would I tell it to use an external (or internal if I am so minded) oscillator?


Did you use the board definitions from the site you linked?

The fuse settings include "RESET DISABLE"... so now you need a "high voltage" programmer to change things (or get a new chip).

Hi Madworm

This is the board setting I chose when attempting the bootload





Luckily I have another 2313 on hand, but it is running at 1Mhz, which I would like to change. I have found the complete datasheet so just need to read that and try understand how and what values to set.

High voltage programmer eh? I suppose I will have to put the chip aside for now...

So where do you see the RESET DISABLE? And why would he do that?

If you punch in the numbers of low_fuse and high_fuse into "http://www.engbedded.com/fusecalc", you can see what these mean.

By disabling the RESET function, you can use that pin as I/O, but lose the option of uploading code with a standard programmer. I wouldn't do it.

I vaguely recall that...

[X] Reset Disabled (Enable PA2 as i/o pin); [RSTDISBL=0]
[X] Serial program downloading (SPI) enabled; [SPIEN=0]

...are mutually exclusive and, if serial programming is enabled, the reset disabled has no effect.

@AgeingHippy: Do you have an external crystal + capacitors you can add to the circuit?

Hi CodingBadly

I do have some crystals and capacitors. In fact, I must have spent close on £200 on various components in an attempt to build up a stock of components to work with. :slight_smile: Mostly due to the delivery charges lol - I go online to buy a few components I need with the total value less than the delivery charge. Then decide I need to make the charge worth while so I stock up with a load of other stuff... bit like a kid in a candy store :slight_smile:

Connect a crystal (the frequency is irrelevant) and appropriate capacitors to the 2313. Then try to communicate to the 2313. Basically, you use "AVRDUDE -v" with just enough other options (like port and protocol) to connect to the processor. AVRDUDE will output basic information about the processor.

If that works, I suggest using the site in @madworm's post to determine appropriate fuse settings. I also suggest you have the forum review the fuse settings before applying them.