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

one USART, two RS232 needed

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



Joined: 02 Oct 2009
Posts: 123
Location: Denmark

View user's profile Send private message

one USART, two RS232 needed
PostPosted: Sun Jan 24, 2010 1:02 pm     Reply with quote

I'm using a pic16f876 (it have one USART). I need to read/write on two rs232.

Can I use RS232 compiler functions twice (#use rs232 (options) ) to manage also communication on normal (not usart) pins?

Can I do it also with i2c functions?
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sun Jan 24, 2010 2:56 pm     Reply with quote

well, if you're not tied to the 16F876 and don't mind 3.3v operation, use the PIC18FxxJ11 family. They have built in dual EUSARTs.

Otherwise, you end up with software serial on those other non-uart pins.

So yes, it will work, but is very timing sensitive.

I2C is also possible in S/W or H/W -- and it's a clocked protocol meaning no timing issues like RS232...

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
webgiorgio



Joined: 02 Oct 2009
Posts: 123
Location: Denmark

View user's profile Send private message

PostPosted: Mon Jan 25, 2010 11:36 am     Reply with quote

I found a perfect example in the CCS C manual, page 300 (312 pdf) ("How can I use two or more RS-232 ports on one PICĀ®?")
I have understand.
Thank you for your advices!
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