Friday, 9 December 2016

Interfacing with led

#include<reg51.h>
void main()
{
      while(1)
         {
            P1=0XFF;
            P1=0X00;
          }
}

 
 
 









Here #include<reg51.h> is the header file for 8051.

P1 state that port selection of 8051 .

0xFF means 0b11111111
0x00 means 0b00000000.