You are on page 1of 1

#include<reg51.

h>
sbit sa1=P1^0;
sbit sa2=P1^1;
sbit sa3=P1^2;
sbit sa4=P1^3;
sbit sa5=P1^4;
sbit sa6=P1^5;
sbit sa7=P1^6;
sbit sa8=P1^7;
sbit sa9=P2^0;
sbit sa10=P2^1;
sbit sa11=P2^2;
sbit sa12=P2^3;
sbit sa13=P2^4;
sbit sa14=P2^5;
sbit sa15=P2^6;
sbit sa16=P2^7;
sbit sa17=P3^0;
sbit sa18=P3^1;
sbit sa19=P3^2;
sbit sa20=P3^3;
sbit sa21=P3^4;
int start=0;
int prev=0;
void main()
{
P3=0xff;
P2=0x00;
P1=0x00;
while(1)
{
if(sa17==1)
{
}
}
}

You might also like