After flashing the ATtiny85 with code including setting the clock prescale to 0x00 (in code, not flashing the fuse), the next time I try and flash I get the following errors preventing me from doing so:
avrdude.exe: error: programm enable: target doesn't answer. 1
avrdude.exe: initialization failed, rc=-1
avrdude.exe: AVR device initialized and ready to accept instructions
avrdude.exe: Device signature = 0x500075
avrdude.exe: Expected signature for ATtiny85 is 1E 93 0B
I really don't understand. Obviously the USBasp is connected correctly and working (otherwise I would not get the "AVR device initialized..." trace line. I have tried re-flashing code that I was running (CLKPR = 0x00). Then tried flashing a simple blink program (no prescale), still failed. Then tried the blink program on a different ATtiny85 - worked. Back to the original, still can't flash!!!
I tried resetting the fuse using the -B1 to -B6, nothing...
I am very much a novice, so there is probably something stupid that I am doing!
Resetting that device just before I sent the flash sees to work. However, I now appear to have a new problem when trying to flash the fused back to default!
The command that I am issuing...
avrdude -p t85 -P COM3 -b 19200 -c avrisp -U efuse:w::m -v -B700
The output...
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.08s
avrdude.exe: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.06s
avrdude.exe: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.06s
avrdude.exe: Device signature = 0x000000
avrdude.exe: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
After reading round, I am pretty sure that it is clock / crystal related. I am just not too sure how to go about adding a crystal.
Thanks again, Harold Clements