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 support@ccsinfo.com

Changing baud rates for 2 UARTS

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



Joined: 20 Jul 2011
Posts: 60

View user's profile Send private message

Changing baud rates for 2 UARTS
PostPosted: Fri Jul 29, 2011 1:57 pm     Reply with quote

The PIC that I am using (16F1947) has 2 UARTS. I know that if I set the baud rate using the set_uart_speed, I have the option of setting a stream. I tend to believe that the stream would be the only way to differentiate between the 2 UARTS.

Other than the stream, is there a way to call a specific UART when using the set_uart_speed function? ie, Is there a set_uart1_speed command?

A quick run down of my situation - I need the ability to change the baud rate based on my DIP switches. So far, I find that the last #use command listed for a specific UART seems to rule, regardless of the conditional statements that I have created. I played with the set_uart_speed at while ago; however, this was before my implementation of streams. This morning, I found that my conditional statements and streams were not doing me a dime of good for the #use rs232 statements. So, I'm thinking that at this point, I need to implement the set_uart_speed command.

I know that there is another posting on this; however, I'm not sure that posting dealt with 2 UARTs.

Thanks -

RckRllRfg
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jul 29, 2011 2:11 pm     Reply with quote

Quote:
Is there a set_uart1_speed command?

Download the CCS manual and put it on your desktop for easy reference.
http://www.ccsinfo.com/downloads/ccs_c_manual.pdf
You can quickly find out if that function exists or not.

Also, there appear to be two of you in the same group. You shouldn't both
ask the same question in two different threads.
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