![](https://csdnimg.cn/release/download_crawler_static/87058014/bg11.jpg)
#include<reg51.h>
#include<stdio.h>
sbitP1_0=0x90;
unsignedcharnSendByte;
voiddelay(unsignedinti)
{
intj;
for(;i>0;i--)
for(j=0;j<125;j++);
}
main()
{
SCON=0x00; /*设置串行口为方式0*/
EA=1; /*全局中断允许*/
ES=1; /*允许串行口中断*/
nSendByte=1;
SBUF=nSendByte; //启动串口发送
P1_0=0; //允许串口向164串行发送数据
while(1);
}
.
17