Please bare with me as I am a newbie to the CCS world. I am trying to implement UART communication in which the parity is dependent on the state of two switches. I am using the #use rs232() directive but I can't find a way to change the parity once it is already established as an option. I know there is a function set_uart_speed() that allows you to change the baudrate midprogram. Is there a simple way to change the parity? Thanks.
There are two routes.
1) Use two streams, with the parity set to the two values, and select the stream based on the switch.
2) Have two #use RS232 statements, and route the code to go past the one you want. The baud rate, parity etc., always comes from the last of these statements passed, when stream identifiers are not used.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum