USBasp USBISP 3.3V/5V AVR Programmer

Hi I have installed the programmer using Zadig and it reports it is there and it is shown in windows with no issues, but when trying to program an at89s52 with avrdude on a clone development board, it report as follows.

Set SCK frequency to 375000 Hz
Error: cannot set sck period; please check for usbasp firmware update
Error: program enable: target does not answer (0x01)
Error: initialization failed (rc = -1)

Seems to be a common problem but I have no idea where to start troubleshooting.
Should I set up the micro on a breadboard to eliminate the dev board as a possible problem or is this a known issue with a fix for the programmer ?
Thanx Brian.

Sounds like a good idea, depends on how the dev board handles the micro and what the dev board is to be used for.

Atmel always have very good data sheets.
The datasheet says the RST pin should be held high during programming.
Zadig is a driver to make the USB port work as a serial port.

The setup of avrdude is an area to check. There are text files with the setup for various microcontrollers, if the AT89S52 is not listed in those files then it will most likely not work.
These are called boards.txt, programmer.txt, platform.txt and located in the arduino install directory. arduino-1.8.13\hardware\arduino\avr
I have not used Arduino for some time so it is out of date. Manually changing these files is not recommended. I don’t know how the latest version of Arduino handles this.

The following shows the setup for serial programming like what the USBasp uses.

Anyway, just some ideas.
Cheers
Jim

EDIT: This might give you an idea how to get it to work. Some forums say 8051 type devices not possible with Arduino setup.

There is a Youtube video that might help too.

2 Likes

I think the firmware is outdated.

Hi, I just tried the programmer with an atmega128 and it worked flawlessly.
Could it be the dev board for the at89s52 ? possibly but I somehow doubt it. A continuity test will confirm when I get the chance.
Outdated firmware ? Wouldn’t that mean that it wouldn’t read the latest chips rather than the earliest ? 2 different 89s52 chips with the same issue. Years ago I used to program these chips with a few bits of wire and a printer port. they are pretty solid. I’m leaning towards a fault in the firmware coding for these chips. I’m running low on time to keep going with this chip, the atmega will suffice for my needs at the moment . I might get back to it at a later date. Thanks for the suggestions. Brian

Hi Brian,

Could you share how you have it wired? The first error indicates it could be out-of-date firmware but the second could mean the pinout is incorrect.