Basic Embedded 'C' Program using 8051 Micro Controller:
1. Program For Blinking LED's:
#include<reg51.h>
void main( )
{
int i;
for(;;)
{
P0 = 0xFF;
for ( i=0; i<32000; i++ );
P0 = 0x00;
for ( i=0; i<32000; i++ );
}
}
1. Program For Blinking LED's:
#include<reg51.h>
void main( )
{
int i;
for(;;)
{
P0 = 0xFF;
for ( i=0; i<32000; i++ );
P0 = 0x00;
for ( i=0; i<32000; i++ );
}
}