I'm having a strange problem here, and I would ordinarily just throw out the offending part, but it's in an SMT design of mine.
I'm working on a project that needs to use the internal clock to about 8MHz on my ATTYIN261. I have been working on it successfully for a long time, modiftying my program, reprogramming and testing. I decided to slow things down.
My code was originally
CLKPR = 0x80; /*Setup CLKPCE to be receptive*/ CLKPR = 0x00; /*No scalar*/
I modified it to
CLKPR = 0x80; /*Setup CLKPCE to be receptive*/ CLKPR = 0xF0; /*No scalar*/
Realizing that this wasn't going to help, I "fixed" it
CLKPR = 0x80; /*Setup CLKPCE to be receptive*/ CLKPR = 0x05; /*No scalar*/
Sure enough, it slowed the part down, but now the part won't program.
I can only get:
# avrdude -c usbtiny -p t261 -U flash:w:test.hex -F avrdude: initialization failed, rc=-1 avrdude: AVR device initialized and ready to accept instructions avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature. avrdude: Expected signature for ATTINY261 is 1E 91 0C avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option.
Note that the processor still sails along happily running the code I put on it earlier, slow. Also, if I assert the reset pin, the processor does reset.
Is there any known issue with changing the CLKPR bits? Can I put the programmer in to slow burn mode or anything? Do I have to spend the hour de-soldering and replacing the part?
Thanks in advance.