# USBasp USBISP 3.3V/5V AVR Programmer

**URL:** <https://forum.core-electronics.com.au/t/usbasp-usbisp-3-3v-5v-avr-programmer/21203>\
**Category:** Uncategorized\
**Created:** [9 November 2024 13:24 UTC](https://forum.core-electronics.com.au/t/usbasp-usbisp-3-3v-5v-avr-programmer/21203 "2024-11-09T13:24:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian273106](https://avatars.discourse-cdn.com/v4/letter/b/7ea924/32.png) [@Brian273106](https://forum.core-electronics.com.au/u/Brian273106)\
**Post date:** [9 November 2024 13:24 UTC](https://forum.core-electronics.com.au/t/usbasp-usbisp-3-3v-5v-avr-programmer/21203/1 "2024-11-09T13:24:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![James46717](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@James46717](https://forum.core-electronics.com.au/u/James46717)\
**Post date:** [9 November 2024 20:40 UTC](https://forum.core-electronics.com.au/t/usbasp-usbisp-3-3v-5v-avr-programmer/21203/2 "2024-11-09T20:40:37Z")

</div>

> [@Brian273106](#):
>
> Should I set up the micro on a breadboard to eliminate the dev board

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.

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/a/ad97d6d08760a5bec644c093fb6cd76e81c7b242.png)

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.

> **[Programming AT89S52 Using USBasp ISP Programmer](https://www.instructables.com/Programming-AT89s52-Using-USBasp-ISP-Programmer/)**
>
> Programming AT89S52 Using USBasp ISP Programmer: Easiest method for adding AT89S series in AVR DUDESS application.

There is a Youtube video that might help too.

---

<div class="post-metadata">

**Author:** ![lia262073](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@lia262073](https://forum.core-electronics.com.au/u/lia262073)\
**Post date:** [13 November 2024 17:53 UTC](https://forum.core-electronics.com.au/t/usbasp-usbisp-3-3v-5v-avr-programmer/21203/3 "2024-11-13T17:53:41Z")

</div>

> [@Brian273106](#):
>
> 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 ?

I think the firmware is outdated.

---

<div class="post-metadata">

**Author:** ![Brian273106](https://avatars.discourse-cdn.com/v4/letter/b/7ea924/32.png) [@Brian273106](https://forum.core-electronics.com.au/u/Brian273106)\
**Post date:** [14 November 2024 03:38 UTC](https://forum.core-electronics.com.au/t/usbasp-usbisp-3-3v-5v-avr-programmer/21203/4 "2024-11-14T03:38:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jack](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jack/32/9287_2.png) [@Jack](https://forum.core-electronics.com.au/u/Jack)\
**Post date:** [14 November 2024 03:41 UTC](https://forum.core-electronics.com.au/t/usbasp-usbisp-3-3v-5v-avr-programmer/21203/5 "2024-11-14T03:41:02Z")

</div>

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.
