USBASP programmer is widely used to upload .HEX file on to AVR / 8051 ICs.
On Windows 10 PC you may face some driver installation problems.Check out my previous blog on how to install drivers.
https://alselectro.wordpress.com/2018/06/08/usbasp-how-to-install-driver-on-windows-8-10/
While connecting USBASP to 8051 development board , take care that GND pin matches GND of both boards.
No separate power source required for development board.It can source from USB itself.
Connect USBASP to PC .
Install driver from link below:
USBASP Driver :
https://protostack.com.au/download/USBasp-win-driver-x86-x64-v3.0.7.zip
Once driver is installed , under Device Manager USBASP appears.
PROG ISP software IDE is used to upload HEX file on to 8051 IC.
Download link is below
PROG ISP :
http://exploreembedded.com/wiki/images/1/1a/Progisp1.72.rar
No installation is required.Unzip the downloaded file and double click on PROGISP application.
On top you can see two blocks , PRG ISP & USBASP
PRG ISP will be greyed out if programmer is not found on not connected.
USB ASP will be greyed out if driver is not installed.
Ensure that these two blocks are not greyed out.
Select your IC from drop down menu. 89C52 or 89S52 , select the correct part no.
Click on Erase button.
If the usbasp device is ok , the erase will be performed.
Here Im getting the infamous CHIP ENABLE Error.
This error persists even after , Programming power adjusted using slider & Verify Signature tick mark removed .
CHIP ENABLE error occurs if the IC is not placed correctly on ZIF socket of development board or if the wrong Chip is selected.
If still the problem persists , then you need to upgrade FIRMWARE of USBASP.
For this we use ARDUINO UNO in ISP mode.
Connect UNO to PC & note the COM port allotted.
Open Arduino IDE .
From Tools select the board as Arduino UNO, Port as COM port allotted
Programmer is selected as ARDUINO AS ISP.
Under File –> Examples –> select ARDUINOISP
Upload the sketch. Now Arduino is ready as ISP programmer.
Now download the USBASP Firmware from the developers website
usbasp Firmware
Download the .tar.gz file & unzip twice. Under bin –> firmare you can see the Atmega8 firmware file in .hex format.
Note the path where this file is saved.
To upload firmware we use AVRDUDES GUI application
Download it from link below and install it.
AVR DUDES :
http://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/
Connect Arduino with USBASP as follows :
ARDUINO USBASP
5V —> Vcc
Gnd —> Gnd
10 —> RST
11 —> MOSI
12 –> MISO
13 —> SCK
Connect USB of PC to ARDUINO ( not to usbasp)
Arduino is Master and USBASP is slave
Open AVRDUDES
Select Programmer as ARDUINO
COM port as port allotted to Arduino
Baud rate 19200 ,if you try any other baud it shows time out error.
Bit clock –leave it blank
Target MCU select as ATMEGA8
Under FLASH click on … and browse to select the firmware file we downloaded earlier.
Fuses can be set as Low Fuse : 0xFF , High Fuse : 0xE9, select tick mark against SET FUSES.
Now click on DETECT
I get an error saying signature 00000 , which means target is not detected.
If you check the schematic of USBASP , a jumper JP2 is to be ON to enable self programming.
This jumper is between pins 1 & 16 (slave select pin) of USBASP IC.
As my USBASP is not having this jumper I soldered a 270E resistor between pins 1 & 16.
Now I tried DETECT on AVRDUDES.
Target is detected & the signature of ATMEGA8 is 1E9307.
Now on clicking PROGRAM button , the firmware is flashed successfully.
I just removed the resistor and tried uploading hex on to 8051 successfully.
Let us see the second method of upgrading firmware .
Here we use another working USBASP programmer instead of ARDUINO.
Connection is one to one
Vcc to vcc , Gnd to Gnd , MOSI toMOSI , MISO to MISO , RST to RST
On target USBASP a 270 E resistor soldered between pins 1 & 16.
PC is connected to Master USBASP.
Open AVRDUDES.
Select programmer as USBASP , port as USB , Baud as 19200
Bit clock will be automatically selected as 1.5MHz
Click on Program to see the firmware upgraded successfully.
This method is slower than Arduino method.
Ignore any SCK clock error which occurs due to un success full bit clock setting.
VIDEO SUPPORT :
I have a problem with the chip enable program error. then I followed your solution, but it didn’t work. can you help me?
i found new problem. when i select “detect” , i get “warning: unable to detect MCU”
My usbasp programmer has atmega8a instead of atmega8. And avrdudess does not have atmega8a in MCU list. Can you please tell me how can I update my usbasp firmware?
Great job my friend. I like your site. Useful informations