完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,当我尝试用UART接收字符串时,我正面临一个问题。我使用的是PIC18LF26K22和C183.47.Enter如果工作良好(单和字符串),并且当我只想接收单个字符时,它也能工作,但是我不能得到该字符串。 以上来自于百度翻译 以下为原文 Hello Everyone, I'm facing with a problem, when I try to receive string with UART. I'm using a PIC18LF26K22 and C18 3.47. Transmit if working fine(single and string), and also when i just want to receive a single char it's also working, but i cannot get that string back. Any help are welcome Thanks My routines are the follows: //Receive Text void UART_Read_Text(char *Output, unsigned int length) { unsigned int i; for(i=0;i Output = UART_Read(); } } //Data Ready char UART_Data_Ready() { return PIR1bits.RC1IF; } //Transmit Text void UART_Write_Text(char *text) { int i; for(i=0;text!=' |