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

#use rs232

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



Joined: 14 Feb 2020
Posts: 23

View user's profile Send private message

#use rs232
PostPosted: Tue Jan 19, 2021 1:44 pm     Reply with quote

Hello good afternoon everyone.

Well at the beginning of the microcontroller programming it is possible to adjust some communication parameters like baudrate stop bit, parity, timeout .....

Code:
#user rs232 (baud = 19200, bits = 8, parity = E, timeout = 5)


However at program time I can only modify the baud rate
Code:
set_uart_speed (9600, serial)


How do I change the other items above at program times?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jan 19, 2021 6:57 pm     Reply with quote

Use streams. See the CCS manual:
https://www.ccsinfo.com/downloads/ccs_c_manual.pdf

Then use fputc(), fprintf(), fgetc(), etc. and specify the stream you want
to use in each one of those functions.
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jan 19, 2021 7:12 pm     Reply with quote

Just remember to keep in mind that changing the RS232 parameters could be disasterous unless you properly communications to the other 'device' !!
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