#include<reg2.H>
#define uint unsigned int
#define uchar unsigned char
uchar a;//???????????
void delayxms(uint z)//??????
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void main()
{
TMOD=0x20;//???1????2,8?????
TH1=0xFd; //11.0592M??,9600???
TL1=0xFd;
SCON=0x50;//????1 SM0 SM1 01 ????
PCON=0x00;//SMOD=0 16??
TR1=1;//?????1
ES=1;//??????
EA=1;//????
//????????????
while(1)
{
if(a=='A')P0=0xfd;//??
else if(a=='B') P0=0xfc;//??
else if(a=='C') P0=0xfc;;//??
else if(a=='D') youz();//??
else tingz();//??
}
}
void serial() interrupt 4//?????
{
RI=0;//?0
a=SBUF;
}
|