单片机的串口发送
#include<reg52.h>
#include<stdio.h>
void Debug_put(unsigned char *s,unsigned char c){
TMOD = 0x20;
TH1 = 0xfd;
TL1 = 0xfd;
TR1 = 1;
SM0 = 0;
SM1 = 1;
REN = 1;
EA = 1;
ES = 1;
TI = 1;
printf("%s%d",s,c);
while(!TI)
;
TI = 0;
TR1 = 0;
ES = 0;
}
void main(){
Debug_put("123\0",4);
}