I have got a new batch of ATTiny85-20PU microcontrollers, THEY WONT PROGRAM via USBasp :~
If i swap the new with the old, it programs fine, so I know its nothing stupid I am doing
So... if they are the same component, why do some program and some dont ?
I have been searching for some answers
somebody suggested reducing the SCK frequency using the -B parameter with avrdude, but I dont use AVRDude, I use the arduino 1.0.4 interface..
Here is the output I get...
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Any help here would be really appreciated as I am down to only TWO working ATTiny85's
Yeah, how did you guess... anyway I will persevere !!
I have tried compile/upload and got the error, then I copied the avrdude 'run line' from the verbose
I added -B4 into the line and pasted it back into run-dos-shell
With the -B4 bitrate my program uploads fine
if I remove it, it fails
I have been searching the avr/avrdude config file for somewhere I can insert this "-B4" so that Arduino IDE will always use this option when I select this chip/programmer option
If the -B option works from command line, then your in luck. You can set that clock rate option in the avrdude.conf file.
Go to the arduino-1.0.4\hardware\tools\avr\etc\avrdude.conf and edit the line around line number 319 to:
# default_bitclock = 2.5
default_bitclock = 10
This should set the default clock rate low for the IDE to use.
Thanks very much, I was actually fiddling in this area but not sure I got it quite right. Also I think I may have had to restart my IDE after I changed the config file !!
I will try this tomorrow. Thanks again
Actually I tried this straight away, and after I got a syntax error for the missing ";" everything worked just fine - thank you very much Sir !!
Old topic, but in case someone else has the same symptoms:
There is a jumper on USBASP to reduce the programming speed. This is required for brand new chips (of any kind) until the fuses are set correctly.
What you did was the same, simply with software. The drawback if kept as such is slower programming, so it is advisable to return to stock settings after the fuses are programmed. Or use the jumper in the first place, if the programmer allows access to it.