Four RS232 ports on a PIC

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


Hi,

I want to ask expert advise how can I create four RS232 interface on a
PIC microcontroller?

(I'm planning to use PIC18F6680 on SBC68EC board from Modtronix,
http://www.modtronix.com/product_info.php?cPath=1_23&products_id19%6 )

Thanks,

Miem Chan
miemchan at gmail . com


Re: Four RS232 ports on a PIC


Easiest way is to get external uart chip like 65550 which is quad uart and
takes care of everything. You just write the buad rate and settings to its
registers and it can do interrupts and everything for you. Connect to the
user I/O pins.

Of course you still need a line driver there are heaps of quad rs232 line
drivers chips.

If you are using low buad rates you can skip the 65550 and code everything
yourself with a crude polled setup.

Quoted text here. Click to load it



Re: Four RS232 ports on a PIC


Quoted text here. Click to load it


Your two biggest mistakes were asking for "expert advise" and wanting to
  interface to a PIC.

You can't simply bolt on a quad uart unless you have an external bus and
even then it is always far more economical to just use a micro that
already has 4 uarts on-board. 32-bit ARM chips are so cheap and have
everything on-board.

However, if your RS-232 interfaces are low speed and the same baud rate
you may be able to handle this in a interrupt driven bit-bashed fashion.

If the ports are only effectively used in half-duplex mode then that
simplifies things again. If the ports are only used one at a time then
that is even simpler.

 > (I'm planning to use PIC18F6680 on SBC68EC board from Modtronix,
 > http://www.modtronix.com/product_info.php?cPath=1_23&products_id19%6 )

That being said do you really want expert advice or do you want to do it
your way?

*Peter*

Re: Four RS232 ports on a PIC



Quoted text here. Click to load it

What is the application ? the board seems to have Ethernet already why do
you want 4 serial Ports ?

There is no easy way - as has been suggested already use interrupt driven
code to run lower speeds or use 8 pins to form a data bus to external
UARTs - this is actually fairly straightforward but uses plenty of I/O

Regards
Richard Freeman



Site Timeline