Hayee
Member level 4

Hi
I am going to print some values using usart port. I am using pic18f46k22 microcontroller along with mplab XC8 compiler.
This micorcontroller have two usart ports.
normally the microcontroller which have only one usart port, we can print like
and we don't have to define in print function which port is it because microcontroller have only one port
note: printf is the standard function
but how we can print in pic18f46k22 with the desired serial port?
when i use the above code without defining the port, nothing prints.
Can you tell me how to define the port on which I have to print?
I am going to print some values using usart port. I am using pic18f46k22 microcontroller along with mplab XC8 compiler.
This micorcontroller have two usart ports.
normally the microcontroller which have only one usart port, we can print like
Code:
printf("%u",value);
note: printf is the standard function
but how we can print in pic18f46k22 with the desired serial port?
when i use the above code without defining the port, nothing prints.
Can you tell me how to define the port on which I have to print?