I programed an attiny45 with the blink code just to practice as it was my 1st time doing it. Well it worked just fine. Now when i tried to program my final code on that same chip it errors out but i could upload the final code to a new attiny45. So my question is are attiny45 chips a 1 time use or is there a way to delete the old code and replace it with a new code?
ok here are the error codes
Arduino: 1.6.7 (Windows Vista), Board: "ATtiny, ATtiny45, 8 MHz (internal)"
Build options changed, rebuilding all
Sketch uses 934 bytes (22%) of program storage space. Maximum is 4,096 bytes.
Global variables use 15 bytes of dynamic memory.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
kau_cinta_ku:
This may be a dumb question so sorry in adavnce.
I programed an attiny45 with the blink code just to practice as it was my 1st time doing it. Well it worked just fine. Now when i tried to program my final code on that same chip it errors out but i could upload the final code to a new attiny45. So my question is are attiny45 chips a 1 time use or is there a way to delete the old code and replace it with a new code?
Thanks
My guess is that you programmed a brand new ATTiny45 which comes from Atmel with the internal oscillator enabled (hence the FIRST program cycle worked).
Then when you programmed it, you programmed a fuse incorrectly to use an EXTERNAL oscillator or crystal (I made the same exact mistake with an ATTiny85).
IF your pins #2 and #3 are free, connect a crystal across them (4 mHz, 8 mHz... doesn't matter) - just hold the crystal against the pins and see if you now can program it.
If it works, then that was your problem. The factory default for the fuses are:
HIGH FUSE: 0xDF
LOW FUSE: 0x62 <-- this one controls the oscillator
EXT FUSE: 0xFF
Another option is to use a high voltage programmer (like the one from MightyOhm), but you SHOULD be able to save yourself by temporarily connecting a crystal to pins #2 and #3.
Bad fuses produces different error - the programmer gets as far as trying to read the sig, and thinks it got a signature of 000000. And besides, he says it's running blink, and he didn't mention burn bootloader but just uploading sketch.
I'm with coding badly, it's a programmer problem I think. What programmer are you using?