#include "sh88f516.h"
#define uchar unsigned char
void Uart_setting();
void Time1_setting(void);
void delay();
uchar flag_sbuf;
void main()
{
P3_4=0;
Time1_setting();
Uart_setting();
while(1)
{
while(!RI==0)
{ RI=0;
P3_4=!P3_4;
//delay();
//RI=0;
}
}
}
void Time1_setting(void)
{
TMOD=0X20;
TCON1=0X40;
TH1=0xE6;
TL1=0xE6;
TR1=1;
}
void Uart_setting()
{
SCON=0x50;
}
这个程序的波特率设置是否正确 |