AT89S52 Led Blinking


Step 1 - Intall the USBasp Driver
USBasp Driver
USBasp Driver


Step 2-  Go To the offical website and update with the latest driver

Now USBasp will be discovered when USBasp hardware  is plugged

Step 3 :- Download and install Keil for 8051 micro-controller https://www.keil.com/demo/eval/c51.htm
Step 4:- Open Keil UVision5 ->Create A new project -> Select Micro-controller AT89S52 -> Add startup file -> right click on source group 1 -> Add new item to the group 'source group 1' -> add .c file -> copy and paste below c source code  -> right click on 'Target 1' -> click on Option for Target - 'Target 1 ' -> Go to output Tab -> enable 'Create Hex file' -> build the project -> now hex file will be created
Keil UVision5

8051 hex file

Build the project to generate Hex file

Step 5:- LED blinking C Program code ; connect led between Port 2-Pin 7 to GND
---------------------
#include <REGX52.h>
delay(unsigned int y)
{
    unsigned int i,j;
    for(i=0;i<y;i++)
    {
        for(j=0;j<1275;j++)
        {
        }
    }
}

main()
{
    while(1)
    {
       P2_7 = 0;
       delay(100);
        P2_7 = 1;
       delay(100);
    }
}
---------------------
Step 6:- Open Progisp , you will see under [program state] PRG ISP  will become enabled from gray scale 
Download link for progisp :- Progisp1.72.rar 

Progisp1.72

Step 7 :- select the micro controller  , AT89S52
click on File - >  Load Flash -> select hex file -> click on Auto to load hex file to micro controller

Step 8:- if you get chip enable program error ,firstly check all the connections if problem persist , reset your micro controller by setting RESET pin to High also try reinstalling USBasp driver 



Incoming Search Terms :-

chip enable program error 

At89s52 chip enable program error

usbasp chip enable program error

progisp chip enable program error

at89s52 led blinking

at89s52 led glow

at89s52 keil 8051

At89s51 chip enable program error

At89s53 chip enable program error

No comments:

Post a Comment