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.

 

IMG_20190328_165320

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.

 

Image 1

 

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.

 

Image 2

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.

 

Image 3

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.

 

IMG_20190328_170032

 

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.

 

Image 4

Under File  –> Examples  –>  select  ARDUINOISP

Upload the sketch. Now Arduino is ready as ISP programmer.

 

Image 5

 

Now download the USBASP Firmware from the developers website

usbasp Firmware

https://www.fischl.de/usbasp/

Image 6

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

IMG_20190328_171442

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.

 

Image 7

Now click on DETECT

I get an error saying signature 00000 , which means target is not detected.

 

Image 8

 

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.

u1

As my USBASP is not having this jumper I soldered a 270E resistor between pins 1  &  16.

 

IMG_20190328_172731

 

IMG_20190328_172955

 

Now I tried DETECT on AVRDUDES.

Target is detected & the signature of ATMEGA8 is 1E9307.

 

Image 10

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

 

IMG_20190328_182945

On target USBASP a 270 E resistor soldered between pins 1 & 16.

 

IMG_20190328_183000

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

 

Image 12

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.

Image 13

 

VIDEO SUPPORT :

 

 

 

blog_image