Pis and serial ports...

Just a quick question (it'll break the silence here!): How good are PIs at doing serial ports with a usb->serial adapter? Just a little project I have in mind.

--
Stan Barr     plan.b@dsl.pipex.com
Reply to
Stan Barr
Loading thread data ...

I'd rather trust a "proper" serial port than one hanging off the USB, something like this perhaps

formatting link

Reply to
Rob Morley

I've used the single serial port already programmed into the Raspberry Pi on pins 5, 7 and 9 of the GPIO connector:

formatting link

and it's worked perfectly for me. I do keep the levels to 3.3 V, though. I pass the DCD line via another I/O pin, when it's needed.

--
Cheers, 
David 
 Click to see the full signature
Reply to
David Taylor

Thanks guys. The GPIO one would requre level conversion for me (MAX232??) as I was thinking of attaching one of my DEC terminals as system console for TOPS-10.

I'll give it some thought...

--
Stan Barr     plan.b@dsl.pipex.com
Reply to
Stan Barr

So does this mean that the RPi can not use USB serial ports at all ???

Reply to
hamilton

No, it is just an expression of his personal opinion.

Reply to
Rob

On 06/09/2013 18:05, Stan Barr wrote: []

Yes, the MAX chip is a possibility (likely what was on the card someone suggested), but it /may/ be OK with just a diode clamp and resistive divider for input, and direct drive for output. Safer to use the chip with equipment that old....

--
Cheers, 
David 
 Click to see the full signature
Reply to
David Taylor

No, indeed you may well find that such a converter works perfectly, but as the R-Pi UART is available it makes more sense to me to use that, particularly as ready-made solutions are available. Here's another:

formatting link

Reply to
Rob Morley

Remember that an RS232 driver and receiver need to be inverting. So you at least need a transistor or fet in each direction, or use a chip with inverters (4049 or similar).

Reply to
Rob

Oh, good.

Just to help me along, how many USB devices (serial ports, parallel ports) can be used with the RPi ?

Is there an upper limit to the drivers ?

hamilton

PS: My goals are to not use any of the GPIO on the RPi.

Reply to
hamilton

USB is theoretically limited to addressing 127 devices per host controller, including any intervening hubs.

Reply to
Rob Morley

Actually people who have done this have used the MAX3232 chip, as it supports the 3.3V lines of the Pi.

Reply to
Dom

I believe there is a limit to the number of hubs that the Pi's USB can cope with. Something like 3 levels including the built-in hub on the model B.

Reply to
Dom

Quite agree RS232 is nominally +/- 12 V but the spec does go down to

+/- 3 V. Voltages between -3 and +3 V are "undefined". So, in theory, a 0 to +3.3 V signal should not work at all.

Interfacing to old kit I'd use a MAX232 chip or similar.

--
Cheers 
Dave.
Reply to
Dave Liquorice

The Pi is fine with USB serial ports - no different from any other Linux device in that respect. I've used many in the past year or so - USB 3G modems which look like serial ports, Arduinos and talking to various bits of machinery, and other PCs etc. Fastest I've used is 115200 baud though.

The on-board one is fine too - if you can manage the 3.3v signals.

Gordon

Reply to
Gordon Henderson

Me too, but there are plenty of commercial adapters these days.

Even things like this:

formatting link

which can be used on other PCs without a serial port (ie. most modern PCs!) to talk to the serial port on the Pi.

Or something like this:

formatting link

Lots of options.

Gordon

Reply to
Gordon Henderson

I thought USB was basically a broadcast medium, so it wouldn't matter how many hubs are between a host controller and the target device (apart from timing limitations incurred by deep nesting).

Reply to
Rob Morley

Theory and practice are the same *in theory*, in practice they differ considerably.

The only issue in receiving a 233 signal is that you must limit the voltage to what the chip input will tolerate and you need an inversion. So a transistor will do nicely.

A standard 232 receiver uses a unipolar input referenced to ground. The actual threshold is typically about 1 volt. So again, you only need an inversion to drive this input from standard logic levels.

The high drive and "dead" zone between +3 and -3 volts is to provide enough drive to overcome noise issues when using long cables. If you aren't driving long cables you won't have an issue. You may find it won't work at very high speeds though, depending on the details of all the components.

--

Rick
Reply to
rickman

But the hubs have to be "enumerated" too. Therefore they also count as a device. And device numbers are limited to 127 by the design of USB (7 bit ids).

--
Reinhardt Behm
Reply to
Reinhardt Behm

From the forums (from one who knows)

"There is a limitation on the number of cascaded hubs you can use with the Raspberry Pi. If your device refuses to work when used with a multi-port hub, then use lsusb -t to display a "tree" of what devices physically connect to which. There is always at least 1 hub in a model B: the ethernet chip is actually a 3-port hub and a USB ethernet device."

formatting link

Reply to
Dom

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.