stancol
Posts: 1
Joined: Tue Aug 16, 2011 1:05 am

Re: RS232

Mon Sep 26, 2011 3:17 am

Is there or can there be an RS232 port? I do realize it has USB and that I could adapt a USB to serial interface to do the job. It's just that if I don't have to add an extra piece of hardware means less points of failure and it's easier to integrate.

Michael
Posts: 340
Joined: Sat Jul 30, 2011 6:05 pm

Re: RS232

Mon Sep 26, 2011 3:45 am

There is no RS232 interface. There is both a uart debug serial interface and an I2C interface so with a little effort you could either attach a level shifter to the UART (assuming you don't need full RS232 signalling such as RTS, DTR lines, etc) such as MAX-3232, or build an I2C to RS232 converter and software driver.

The former has the downside that you would lose your serial console - making debugging more difficult. The latter is the kind of thing I would expect to already exist but a quick google search didn't turn up anything (several ICs and projects going from RS232-to-I2C but not the other way around).

A thrid option would be to use the GPIO lines to implement a second serial port.

User avatar
Gert van Loo
Posts: 2487
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: RS232

Mon Sep 26, 2011 6:22 am

We are using TTL to USB cables from FTDI. They accept 3V3 on one side and have USB on the other. That saves us putting down RS232 drivers. Most people do not need RS232 but I know it is used a lot in the Linux community for bring up.

danishGuy
Posts: 2
Joined: Fri Sep 09, 2011 6:20 am

Re: RS232

Mon Sep 26, 2011 7:50 am

Quote from Michael on September 26, 2011, 04:45
...
The latter is the kind of thing I would expect to already exist but a quick google search didn't turn up anything (several ICs and projects going from RS232-to-I2C but not the other way around).
...
port.

Here is one:
http://www.nxp.com/documents/d.....6IS762.pdf

scologic
Posts: 61
Joined: Mon Sep 12, 2011 8:05 am
Contact: Website

Re: RS232

Tue Sep 27, 2011 7:53 am

The usb - serial devices are very cheap and there are only 2 or 3 chip designs, all of which are linux compliant. if you need something a bit special speak to brainboxes in the UK as there business is rs232 type technology devices and they have written their own drivers.

eggn1n3
Posts: 106
Joined: Fri Jul 29, 2011 10:36 am

Re: RS232

Tue Sep 27, 2011 8:31 am


User avatar
Gert van Loo
Posts: 2487
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: RS232

Tue Sep 27, 2011 8:37 am

This is what I use: http://www.adafruit.com/products/70
Yes that is one of the FTDI cable I mentioned! There is only one problem with them: we have 1V8 and 3V3 versions and they look identical. Once unpacked you no longer know which one is which....

malcolmh
Posts: 25
Joined: Fri Jul 29, 2011 3:59 pm
Location: Hull, UK

Re: RS232

Tue Sep 27, 2011 4:41 pm

I have it in mind to construct an quad asynchronous serial I/O add-on using the GPIOs and a purpose-written device driver. Although my application requires V.11 levels, making a V.28 version would only require different level converter chips. The device driver would be the same.

There are multi-protocol chips available that can select the level by software, but these are more costly.

User avatar
TonyD
Posts: 451
Joined: Thu Sep 08, 2011 10:58 am
Location: Newcastle, UK
Contact: Website

Re: RS232

Thu Sep 29, 2011 2:08 pm

It you just want a single RS232 then adding a board with a MAX232 or MAX202 line-driver is the way to do it. A UART function is available on the RPi 16-pin I/O connector(s).

If you want multiple serial ports then you can use the SPI or I2C interface to add a dual or quad SPI/I2C UART controller. The MAX14830 will do a quad UART with SPI or I2C interface. Providing a software driver for them will be the hard part ;-)
Tony

Jason
Posts: 9
Joined: Sun Sep 11, 2011 9:48 am
Contact: Website

Re: RS232

Fri Sep 30, 2011 12:45 pm

I have used a SPI based UART with 4 (?) UARTS onboard. You'd need to level shift, but these have internal FIFOs and can run at fairly high speed (so RS485/422 rates). You'd need your own drivers.

Sadly, RS232 is only really used in industry and that it being phased out in preference to USB or Ethernet.

I've got a current project (for the day job) that requires Modbus over RS232, but most companies are happy with ModBus over TCP.

Another (more costly) option is a Ethernet to RS232 gateway. I've used 8-port versions of these, and the smaller 1-port version. Great bits of kit as I can control RS232 devices in the lab, whilst sitting in the office.. Not cheap- but if anyone had a commercial application, they are worth considering.

Blars
Posts: 88
Joined: Sun Aug 28, 2011 3:22 am
Contact: Website

Re: RS232

Sat Oct 01, 2011 9:10 am

Quote from TonyD on September 29, 2011, 15:08
If you want multiple serial ports then you can use the SPI or I2C interface to add a dual or quad SPI/I2C UART controller. The MAX14830 will do a quad UART with SPI or I2C interface. Providing a software driver for them will be the hard part ;-)
MAX14830 seems to be made of unobtainium, not even listed as out of stock by Digikey, Mouser, and Futurelec. They only seem to carry the single-uart versions, and those are $5 in hundred quantity. Much cheaper to just use a PIC or other microcontroler ($1-$2).

Return to “General discussion”