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

Two UART problem - one software, one hardware

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



Joined: 17 Jun 2004
Posts: 3

View user's profile Send private message

Two UART problem - one software, one hardware
PostPosted: Sat Jul 22, 2006 1:47 pm     Reply with quote

I am trying to use the HW uart on 18F2620 to communicate with a gps, and a SW uart to communicate with a radio. They are on different lines , c6 and c7 for HW and B4 B5 for SW.

My question pertains to the setup_uart function. What is the best way to implement this? Can I use file stream identifiers if one of them is a Hw UART? If I do it this way should I call setup_uart(true); once, then just use the identifiers, or do I need to disable and reenable the uart?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jul 22, 2006 3:18 pm     Reply with quote

The two streams should be defined with #use rs232() statements.
Example:
http://www.ccsinfo.com/forum/viewtopic.php?t=25944
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