CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

UART parity question

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
se1175



Joined: 29 Nov 2007
Posts: 1

View user's profile Send private message

UART parity question
PostPosted: Thu Nov 29, 2007 2:44 pm     Reply with quote

Hey everyone,

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.

Scott
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 29, 2007 3:10 pm     Reply with quote

See this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=26561
Ttelmah
Guest







PostPosted: Thu Nov 29, 2007 3:12 pm     Reply with quote

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.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group