I want to sent binary to comms port?
Please explain can it be done
It is not necessary, but it's quite likely to be the most convenient:
In most cases, "binary" data will be 8-bit bytes - so setting the serial port to 8 data bits makes sense.
The other important thing is to ensure that the port (including any drivers) will not try to interpret any specific values as any kind of "control" code - eg, software flow control...
8 data bits
why 8?
Yes, of cause, it can be done. Make sure you configure UART for 8 data bits. Any binary value loaded to the UART's tx register will be sent over the serial line.
View all questions in Keil forum