#include<reg52.h>
unsigned char flag,a,i;
unsigned char table[]="I get ";
void main()
{
SCON = 0x50;
TMOD = 0x20;
PCON = 0x80;
TH1 = 0xf3;
TL1 = 0xf3;
TR1 = 1;
EA = 1;
ES = 1;
while(1)
{
if(flag==1)
{
ES = 0;
for(i=0;i<6;i++)
{
SBUF = table[i];
while(!
ti);
TI = 0;
}
SBUF = a;
while(!TI);
TI = 0;
ES = 1;
flag = 0;
}
}
}
void ser() interrupt 4
{
RI = 0;
a = SBUF;
flag = 1;
}
是什么问题呢?
一周热门 更多>