串口接收程序 发送字符串程序

标签:
串口cit |
分类: C |
//串口接收程序,P0口显示接收数据, 11.0592MHz,波特率9600bps;
//调试通过;
#include <reg51.h>
void serial_port_initial()//
{
}
void main( void )
{
}
http://s9/middle/67d069a9493eb7e172cb8&690
//串口发送程序
//11.0592MHz,波特率9600bps,循环发送cc[],调试通过;
#include <reg51.h>
#define uint unsigned int
uint i, j;
unsigned char cc[]="hello world!";
//也可写为:unsigned char cc[]={‘1’,‘2’,‘a’,'w'};
void delay( uint
a)
{
for(i=0;i<a;i++)
for(j=0;j<120;j++);
}
void serial_port_initial()//
{
}
void send_UART(unsigned char i)
{
}
void main( void )
{
}
//注意protus的单片机设为一致11.0592MHZ