I'm also having some inconsistency issues with avrdude:
- Code: Select all
c:\WinAVR\projects\pwm>avrdude -c usbtiny -p 2313 -U flash:w:pwmrvk.hex:i -F
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xffffff
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for AT90S2313 is 1E 91 01
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "pwmrvk.hex"
avrdude: writing flash (296 bytes):
Writing | ################################################## | 100% 4.66s
avrdude: 296 bytes of flash written
avrdude: verifying flash memory against pwmrvk.hex:
avrdude: load data flash data from input file pwmrvk.hex:
avrdude: input file pwmrvk.hex contains 296 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.19s
avrdude: verifying ...
avrdude: 296 bytes of flash verified
avrdude done. Thank you.
As you can see, signature is 0xFFFFFF, however, the AT90S2313's flash can be written successfully (and it works, checked the functionality).
I bricked two AT90s1200 after a write with USBTinyISP connected to my laptop's USB (on desktop the chips worked perfect, the 1200s were both read / written a lot of times as well as the 2313). After running USBTinyISP from laptop and a first write done, strangely, the 2313's signature cannot be read (0xffffff) but I can write OK - also - the 1200 return 0xffffff for signature, but can't even be written to. The 2313 (paste above) is the only one I can still program if I use the -F argument to avrdude. Somehow, just the signature is missing.
So.. I think avrdude / usbtinyisp firmware / atmel uC itself (or a combination of these) does some weird things when the circuit is a bit underpowered. Wrong bits / commands might be sent to the uC being programmed / or are badly interpreted by the receiving uC which then remains in a permanent state.
As said, a month or so the programmer worked perfect on the desktop with those uC above. After moving to the laptop, they started showing weird behavior after the first write.
If I move back to the desktop, good uCs are read / written properly, however, these ones which got at least 1 write on laptop do not recover.
My USBTinyISP is the variant which is low powered to 3.6V using to normal diodes hooked up in series after USB 5V pin, to give the programming Tiny2313 the 3.6V (I just ordered some 3V6 zener diodes for USB data pins only and intending to redo USBTinyISP).
I think I tried to program those uC (on laptop) having them also powered from 3.6V (so both the programming uC as well as the programmed uC were low powered). Maybe some kind of race condition ? I don't know. After feeding 5V to the programmed uC, results started to be consistent ( I mean I can write OK and read the signature 0xFFFFFF on the AT90s2313 I'm trying to program). Having it at VCC 3.6V produces even weirder results: sometimes the signature is read as 0x000102, sometimes I get errors when writing, etc.
I'm a bit confused and do not fully understand what goes on on Laptop and why those uC got crippled.