Tuesday, 18 August 2015

Program For LED (8051 uc)

#include<reg51.h>
#define Led P2
        void delay(unsigned int x)
        {
                while(x--);
             
        }
        void main()
    {
                 unsigned int i=0x00;
 while(1)
        {
               i=~i;      
                        P2=i;
                         delay(1000);
         }
   }

//Please comment below for any queries

No comments: