char rcv[10]; void main() { UART1_Init(9600); Delay_ms(2000); TRISB=0x00; UART1_Write_Text("at"); UART1_Write(13); //Enter key = CF + LF UART1_Write(10); delay_ms(500); while (1) { PORTB.RB0=1; // Endless loop while(!UART1_Data_Ready()); // If data is received, rcv[0]=UART1_Read(); rcv[1]=UART1_Read(); rcv[2]='\0'; UART1_Write_Text(rcv); PORTB.RB0=0; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)