AT89S52 - Simple LED Blinking Project is described below. Other pages related to ATMEL is listed below:
AT89S52 - SIMPLE LED BLINKING PROJECT
The softwares that you needed in your computer are listed below:
Step 3: Program- AT89S**,AT89C** Programmer (Make your own Programmer)
AT89S52 - SIMPLE LED BLINKING PROJECT
Here the simple LED blinking project using AT89S52 is described. Every one who entering into the world of embedded system, must start with this project, so that he/she could get the basic idea of microcontroller.
Step 1: Parts Needed
The parts necessary for this project are listed below.The number within bracket indicates the number of parts.
- AT89S52 (1)
- LED (1)
- 12MHz Crystal (1)
- 22pf Capacitor(2)
- 5V source
- Connecting Wires (As Required)
- Breadboard (or) Common PCB
- Programmer (For transferring Hex code from computer to your AT89S52)
The softwares that you needed in your computer are listed below:
- Keil µVision (Can be downloaded by Clicking Here)
- Prog ISP (or any other to transfer Hex code to your chip)
The programming language I used is C, as it is easier and most of us will already familiar with C for computer application programming.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#include
#define ON 0
#define OFF 1
sbit LED=P2^0;
void DelayMs(unsigned int msec)
{
unsigned int x,y;
for(x=0;x<=msec;x++)
{
for(y=0;y<=110;y++);
}
}
void main(void)
{
for(;;)
{
LED=ON;
DelayMs(5000);
LED=OFF;
DelayMs(5000);
}
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Copy the above code into Keil µVision and compile to get Hex code.
Or you can download the Hex come by Clicking Here
Step 4: Burning
Then the created Hex file is burned into our AT89S52 by using your Programmer. If you don't have any programmer then click here to learn how to make your own programmer.
Step 5: Circuit Schematic
Now make circuit for using our program which is shown below.
Step 6: Now its time to enjoy on seeing the blinking LED.
"Only the Electronics Hobbyist feel the happiest moment at the time his circuit gets working!" If you agree this then comment Here...
No comments:
Post a Comment