char uart_rd; void main() { TRISB=0xF0; PORTB=0x00; UART1_Init(9600); delay_ms(100); while (1) { if (UART1_Data_Ready()) { uart_rd = UART1_Read(); if(uart_rd=='g'){PORTB.F0=1;delay_ms(500);PORTB.F0=0;delay_ms(500);} if(uart_rd=='s'){PORTB.F1=1;delay_ms(500);PORTB.F1=0;delay_ms(500);} }}}
SerialPort1.Write("g") SerialPort1.Write("s")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)