Page 1 of 1

Re: How to get multiple UARTS?

Posted: Fri Apr 27, 2012 5:15 pm
by jeffy
Hi Everyone.

R-Pi caught my eye so I been checking out documentation. I see the Broadcom chip supports 2 UARTS but only 1 is brought to the header? UART0? I have no problem converting TTL to RS232 voltage levels.

I have an application in which I'd like to have minimum of 2 UARTS, 3 at best. I can live with 2. How would it be best done with R-Pi? Do we have to use USB to RS232 convertors? Are any of the ARM pins re-assignable from i2c to UART (like some micros?)

What are my options?   Thanks

Jeff

Re: How to get multiple UARTS?

Posted: Fri Apr 27, 2012 5:38 pm
by Gert van Loo
Simplest solution is to use a USB hub and from there you can use USB to RS232 converters.

Re: How to get multiple UARTS?

Posted: Fri Apr 27, 2012 5:55 pm
by jeffy
Thanks Gert!

I like simple

As long as they retain their port assignment. I have not had problems with the USB-to-RS232 devices in the past... so perhaps it is the best way too.

Cheers

Jeff

Re: How to get multiple UARTS?

Posted: Fri Apr 27, 2012 6:00 pm
by domesday
Alternativly use a MAX3110E SPI URART to use the SPI connections on the GPIO connector.

Re: How to get multiple UARTS?

Posted: Fri Apr 27, 2012 6:15 pm
by jeffy
That's a good idea too. It hadn't crossed my mind... thanks Darren. Wow, lots of options. 1 x UART to RS232 + 1 x SPI to RS232. I'd rather whip up a board to handle the voltage conversions than use a large bulky hub + rs232 converters. So long as there is enough documentation to handle the spi.

I want to built an app in C to handle serial communications with a number of different serial devices... like a serial thermal printer and such.

Re: How to get multiple UARTS?

Posted: Fri Apr 27, 2012 10:41 pm
by mahjongg
Yet another alternative is to use a small microcontroller with three serial ports (UART's). Send commands to it from the R-PI with information to which of the two other serial ports to forward the data to, and receive packages of received data from the two other serial ports, with information pertaining to from which of the two serial ports the data was received from.

Obviously you then also have to get/write the scheduler software for the microcontroller, but I have done something similar in the past. the advantage is that the main CPU doesn't have to have SPI, only a serial port.

The parallax propeller http://www.parallax.com/tabid/.....ult.aspx 

is an ideal little chip for such an application, its possible to program it to have eight UARTs.

Re: How to get multiple UARTS?

Posted: Sat Apr 28, 2012 8:28 am
by Chris.Rowland
jeffy said:


Thanks Gert!

I like simple

As long as they retain their port assignment. I have not had problems with the USB-to-RS232 devices in the past... so perhaps it is the best way too.


The best USB to RS232 adaptors I've found are the ones based on the FTDI chip set. They seem to remember their port assignment, even if they are plugged into a different USB port. The RS232 side seems to be better as well.

Many devices will be consistent as long as they are always plugged into the same USB port - including using the same port for a hub if one is involved.

All this is based on experience with Windows but I expect that Linux will be much the same.

Re: How to get multiple UARTS?

Posted: Mon Apr 30, 2012 6:56 pm
by jeffy
Thanks Mah,

I actually have done the rs232 redirection as well with an atmel ATXmega chip... 1 port in, 3 ports out... Yup... it is an option too... and tempting... although a tad more proprietary.

It'll be a long time before rs232 dies. There is more diagnostic equipment out there with rs232 than people on earth I think.lol.

I need the transmission distance too... or used to need it. (150' +) Now with the Pi... I am wondering if I can re-create a project that will collect rs232 data locally... then save information on a mysql server else-where via network. I believe I ought to be able to. Don't know enough about the Pi yet nor have one.

I can go almost any way on the rs232 stuff so far. Maybe one built-in UART and a USB adaptor... so many choices

Jeff

Re: How to get multiple UARTS?

Posted: Mon Apr 30, 2012 7:18 pm
by plugwash
Note that FTDI make multiport USB-serial chips so you can get up to four uarts off one USB port. I think you are also less likely to have problems with ID retention with one multiport chip than with serveral seperate chips on a usb hub.

Re: How to get multiple UARTS?

Posted: Mon Apr 30, 2012 8:20 pm
by jbeale
I guess this is one example: "FTDI USB-COM232-PLUS4"

Looking at the price reminds me what a good deal the RasPi is!

http://parts.digikey.com/1/par.....plus4.html

Re: How to get multiple UARTS?

Posted: Mon Apr 30, 2012 9:00 pm
by plugwash
jbeale said:


I guess this is one example: "FTDI USB-COM232-PLUS4"

Looking at the price reminds me what a good deal the RasPi is!

http://parts.digikey.com/1/par.....plus4.html


Well that is the demo board, the raw chip is only arround $10.

Re: How to get multiple UARTS?

Posted: Tue May 01, 2012 8:46 pm
by jeffy
that's a cool little puppy plug... and I like it. Mounting holes, LEDs and more... looks quite presentable out of the box. Doing a proper enclosure is like 1/4 the work. $49 isn't too bad once you add up the board, LEDs, chips, connectors... maybe 1/3 the price in large qty out of china. Don't need to go there... yet.

Enough rs232 to expand horizons beyound what I need.

Jeff

Re: How to get multiple UARTS?

Posted: Wed Jul 04, 2012 1:19 pm
by blackthorn
I was in the process of building an arduino project needed multiple UART ports and stumbled across a multiplexer that allows for the connection of multiple UART devices to a single port. http://atlas-scientific.com/product_pag ... s-232.html while it isn't REALLY adding extra ports (you merely switch between devices) it could be suitable for certain applications.

It has an NXP 74HC4052 http://www.nxp.com/documents/data_sheet ... CT4052.pdf

One day i'll move my arduino project (which comprised of measuring pH and other water parameters using uart sensors from atlas) to the Raspberry PI as it's much cheaper than an arduino mega with ethernet.

Hope that helps someone out there.

Cheers,

William

Re: How to get multiple UARTS?

Posted: Wed Jul 04, 2012 4:30 pm
by selsinork
domesday wrote:Alternativly use a MAX3110E SPI URART to use the SPI connections on the GPIO connector.
Or a SC16IS762 dual port