View previous topic :: View next topic |
Author |
Message |
webgiorgio
Joined: 02 Oct 2009 Posts: 123 Location: Denmark
|
one USART, two RS232 needed |
Posted: Sun Jan 24, 2010 1:02 pm |
|
|
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
|
|
Posted: Sun Jan 24, 2010 2:56 pm |
|
|
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
|
|
Posted: Mon Jan 25, 2010 11:36 am |
|
|
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! |
|
|
|