标签:
#include<reg51.h>
#include<stdio.h>
void UartInit(void) //初始化波特率为9600
{
SCON=0x50;
TMOD=0x20;
TCON=0x40;
TH1=0xfd;
TI=1;
TR1=1;
}
void main()
{
UartInit();
printf("hello world"); //输出一次数据
while(1);
}
标签:
原文地址:http://www.cnblogs.com/dafang/p/5703661.html