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

Multiple Hardware UART Enable/Disable Question

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



Joined: 09 Feb 2006
Posts: 13
Location: Santa Fe, Texas

View user's profile Send private message Visit poster's website

Multiple Hardware UART Enable/Disable Question
PostPosted: Tue Aug 27, 2013 12:09 pm     Reply with quote

Hi Everyone,
For extra programming room, I am in the process of migrating from a PIC16F1939 to a PIC18F46K22. This application is battery powered, and I must disable the UART to reduce the "sleeping" current draw. The PIC18F46K22 has two hardware UART's (the PIC16F1939 has one). When using the PIC16F1939, I used the command "setup_uart(FALSE)" to disable the UART. The PIC18F46K22 has two UARTs and I get an "undefined identifier" when using the "setup_uart(FALSE)" command. I have searched and can't find a command similar to "setup_uart1(FALSE)" since the device has more than one UART. Can someone help me out with the proper command to disable/enable a UART in devices with multiple hardware UARTs?
I have searched threads in this forum and the latest compiler manual, but could not find any information on this. It's certainly possible that I have overlooked it!!
thanks in advance,
Rick
_________________
--Rick
Ttelmah



Joined: 11 Mar 2010
Posts: 19498

View user's profile Send private message

PostPosted: Tue Aug 27, 2013 12:15 pm     Reply with quote

You need to setup the two RS232's with different stream names, then

setup_uart(FALSE,STREAM1);

disables the UART used by STREAM1 etc...

Best Wishes
RVaughn13



Joined: 09 Feb 2006
Posts: 13
Location: Santa Fe, Texas

View user's profile Send private message Visit poster's website

PostPosted: Tue Aug 27, 2013 12:22 pm     Reply with quote

Great! Thanks for the quick reply!
Rick
_________________
--Rick
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