Four RS232 ports on a PIC

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,

formatting link

Thanks,

Miem Chan miemchan at gmail . com

Reply to
Miem
Loading thread data ...

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.

Reply to
Dac

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.

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

*Peter*
Reply to
Peter Jakacki

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

Reply to
Richard Freeman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.