第2个回答 2010-12-27
#include <STC10.h>
#include <intrins.h>
#include <stdio.h>
#define uchar unsigned char
#define uint unsigned int
uchar show;
void System_Init()
{
TMOD=0x20;
TH1=0xD9;//波特率9600//
TL1=0xD9;
SCON=0x50;
AUXR=0x40;//1T模式//
ET1=0;
TR1=1;
EA=1;
ES=1;
PS=1;
}
void main()
{
System_Init();
while(1)
{
//SBUF=0x41;
//while(!TI);
//TI=0;
if(RI==1)
{
show=SBUF;
P1=show;
RI=0;
SBUF=show;
while(!TI);
TI=0;
}
}
}本回答被提问者采纳