I used ccs a lot and now I'm starting on xc8.
when using more than one uart in ccs, name a stream configuration uart and use fprintf(stream,"TEXT");
Example:
#use rs232 (UART1,BAUD=115200, XMIT=PIN_C6, RCV=PIN_C7, PARITY=N, BITS=8,errors,TIMEOUT=1000,STREAM=main)
#use rs232 (UART2,BAUD=115200, XMIT=PIN_B0, RCV=PIN_B1, PARITY=N, BITS=8,errors,TIMEOUT=1000,STREAM=minor)
void main(){
fprintf(main, "\r\nUART1");
fprintf(minor, "\r\nUART2");
}
I wonder if anyone has an example of doing this in xc8
The best I think you can do is this:
In
main, to print the first USART:In
main(or other functions), to print the second USART: