单片机与232串口通讯
2016-01-13 来源:eefocus
程序:
#include
void UART_init();
void COM_send(void);
char str[40]= 'welcome';
//-----------------------------------------------------
void delay(void)
{ unsigned char j,k;
}
//-----------------------------------------------------------
void main(void)
{
}
//--------------------------------------------------------------
void UART_init()
{
SCON =0x50;
TMOD =0x20;
TH1 =0xfA;
TL1 =0xfA;
PCON=0x80;
ES=1;
}
//发送----------------------------------------------------------------
void COM_send(void)
{
}
上一篇:单片机与串口232通讯《续》
下一篇:51单片机简单易懂矩阵式键盘程序