單片機(jī)與232串口通訊
程序:
本文引用地址:http://www.ex-cimer.com/article/201611/320387.htm#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;
}
//發(fā)送----------------------------------------------------------------
void COM_send(void)
{
}
評(píng)論