Tuesday, 3 November 2015

AT89C51 KEYPAD VALUE ON LED BAR



#include<reg51.h>
void delay(unsigned int i)
{
while(i--);
}
void main()
{
int a,b,c;
P2=0x00;
while(1)
{
P1=0xf0;
while(P1==0xf0);
a=P1;
P1=0x0f;
b=P1;
c=a|b;
P2=c;
}
}

No comments:

Post a Comment