LED Blinking using 8051 Microcontroller and Keil C – AT89C51
LED Blinking using 8051 Microcontroller and Keil C – AT89C51
#include<reg52.h> // special function register declarations
// for the intended 8051 derivative
sbit LED = P2^0; // Defining LED pin
void Delay(void); // Function prototype declaration
void main (void)
{
while(1) // infinite loop
{
LED = 0; // LED ON
Delay();
LED = 1; // LED OFF
Delay();
}
}
void Delay(void)
{
int j;
int i;
for(i=0;i<10;i++)
{
for(j=0;j<10000;j++)
{
}
}
}I Am Not The Owner Of These Code .I Merely Have Copied Them From Various Sources. The Only Thing I Did Is That I Am Going To Present Them In More Easy Way To Understand.
Comments
Post a Comment