RckRllRfg
 
 
  Joined: 20 Jul 2011 Posts: 60
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				| Changing baud rates for 2 UARTS | 
			 
			
				 Posted: Fri Jul 29, 2011 1:57 pm     | 
				     | 
			 
			
				
  | 
			 
			
				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 | 
			 
		  |