Closed MattBelle95 closed 4 years ago
Hey Matt, you've probably got this fixed now, but did you also set the divide clock by 8 fusebit?
@zkemble Hey Zak, I didn't get this problem fixed yet, I am using atmega32 it doesn't have divide by 8 fuse bit These are the default settings of a new atmega32 that i just bought
Have you updated the USBasp firmware (I'm guessing thats the programmer you're using)? They usually come with old firmware where the bit block can only be changed by a jumper on the programmer.
Also send the console output of the error and the new fuse values that you tried.
I can't get the console output of the error because i bought a new controller. i used this calculator to get fuse bits values http://www.engbedded.com/fusecalc Lfuse:0xFF Hfuse:0x89
I found my old broken controller here are the screen shots of the error
and this when i checked -F
It says in the error message "please check for usbasp firmware update", so looks like the programmer firmware needs updating.
so the problem is in the usbasp programmer? where can i get the trusted latest firmware update?
@MattBelle95 https://www.fischl.de/usbasp/
@zkemble i will download the driver and let you kniw what happened, thanks a lot for your effort
@zkemble i downloaded the latest version (i already had it installed, but i removed it and installed it again). it still gives me the same error. another thing i noticed is when i upload a hex file to my new atmega32 (it uploads successfully and the code behaves as expected) it gives me a warning that it can't set SCK frequency
I think you only did something with the driver (libUSB), not the firmware. You need a second programmer, like another USBasp or an Arduino with the ArduinoISP sketch loaded onto it to re-program your USBasp. Do a google search for "usbasp firmware update", there are loads of tutorials on how to do it.
There is also usually a jumper on the USBasp somewhere to select fast (1.5MHz) or slow (375KHz) clock (only for the old firmware, new firmware allows setting the clock by software, which is what the error is all about), try shorting or opening it to see if it can then talk to the bad ATmega32.
i was trying to upload a hex file to test my atmega32, but i forgot to set the fuse bits for clock source selection, the code uploaded just fine but the delay function was much slower (i was using 12MHz crystal and the default settings was the internal 1MHz), i edited the fuse bits and uploaded the code, nothing bad so far, but when i tried to upload it again it gave me an error rc=-1 and that it can't set clock bit to specified value which was 1.5MHz. is there a value i should use for clock bits (-B) corresponding to the selected frequency ?