#include "reg52.h"
#include "intrins.h"
sfr AUXR = 0x8e;
sbit D5 = P3^7; //定义led 接在P3.7
void UartInit(void) //9600bps@11.0592MHz
{
SCON = 0x50; //配置串口工作方式1,RE使能接收数据 0101 0000
PCON = 0x00;
TMOD &=0x0F;
TMOD |=0x20;
TH1 = 0xFD;
TL1 = 0xFD<
51单片机串口点灯
最新推荐文章于 2024-05-04 17:57:09 发布