svrsig
Posts: 134
Joined: Thu Nov 03, 2011 9:45 am
Contact: Website

Re: COM port

Sat Apr 14, 2012 3:47 pm

The instructions on the Farnell site say the following:

"Serial connection
The Serial Port is a simple and uncomplicated method to connect to the Raspberry Pi. The communication depends on byte wise data transmission, is easy to setup and is generally available even before boot time.
First interaction with the board
Connect the serial cable to the COM port in the Raspberry Pi, and connect the other end to the COM port or USB Serial Adapter in the computer."

Where is the 'COM' port on the Raspberry Pi and what plug do I need please?

User avatar
Chromatix
Posts: 430
Joined: Mon Jan 02, 2012 7:00 pm
Location: Helsinki

Re: COM port

Sat Apr 14, 2012 3:56 pm

I'm afraid those instructions are wrong.  AFAIK there is no COM port (aka RS232).

The simplest way to get your R-Pi running is to plug in a keyboard and monitor just like a normal PC.
The key to knowledge is not to rely on people to teach you it.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: COM port

Sat Apr 14, 2012 3:58 pm

Hmm... it sounds like they might want to update that, can you provide a link to it please?

Basically you don't have to use the serial port.  Back in the day people used serial ports for mice or modems or printers or joysticks, but then we got the Universal Serial Bus (USB) and the old serial connection went the way of the dodo.  Some people use it for more advanced applications, but it is *not* necessary to use the R-Pi
Dear forum: Play nice ;-)

svrsig
Posts: 134
Joined: Thu Nov 03, 2011 9:45 am
Contact: Website

Re: COM port

Sat Apr 14, 2012 4:01 pm


Some people use it for more advanced applications, but it is *not* necessary to use the R-Pi


I think it *is* necessary for RISC OS as the USB stack is not yet working (AFAIK).

svrsig
Posts: 134
Joined: Thu Nov 03, 2011 9:45 am
Contact: Website

Re: COM port

Sat Apr 14, 2012 4:06 pm


Hmm… it sounds like they might want to update that, can you provide a link to it please?


If you go to the Raspberry Pi item on the Farnell site there is a link to 'Operating Instructions' see

http://uk.farnell.com/jsp/sear.....KU=2081185 (THE RPi)

and

http://www.farnell.com/datashe.....524403.pdf (the instructions)

User avatar
Chromatix
Posts: 430
Joined: Mon Jan 02, 2012 7:00 pm
Location: Helsinki

Re: COM port

Sat Apr 14, 2012 4:09 pm

If that's so, then let's consider RiscOS to be an "advanced topic" for the time being.

Linux will be perfectly happy with a USB keyboard, mouse and HDMI video output.
The key to knowledge is not to rely on people to teach you it.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: COM port

Sat Apr 14, 2012 4:18 pm

svrsig said:



Hmm… it sounds like they might want to update that, can you provide a link to it please?


If you go to the Raspberry Pi item on the Farnell site there is a link to 'Operating Instructions' see

http://uk.farnell.com/jsp/sear.....KU=2081185 (THE RPi)

and

http://www.farnell.com/datashe.....524403.pdf (the instructions)



Ah yes that is under "Advanced Setup", it's not necessary for normal operation of the Pi

And please, until Risc OS is functional let's keep it out of the Absolute Beginners sub forum as it's beta use is a somewhat advanced set up
Dear forum: Play nice ;-)

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12217
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: COM port

Sun Apr 15, 2012 1:59 am

There IS a serial port on the raspberry PI, its on the GPO header, the two pins described as RXD and TXD. However, these are not "RS232" signals, as real RS232 signals use +8 Volt and -8 Volt as signaling levels, while the levels used by the RXD and TXD pins are 3V3 levels (3.3 volt and 0Volt, and also logically inverted), so you need a "RS232 driver" (chip or something made from a few transistors) in-between.

There is talk on the forum about exactly such a device, and somebody already made a printed circuit board for such a chip (the MAX3232).

I think its unfortunate that Farnell documented the port as a RS232 port, as someone is bound to connect RS232 signals to the GPIO inputs which will destroy the GPO pins (and probably the SoC).

So take heed!

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: COM port

Sun Apr 15, 2012 7:34 am

I think it is fair to say that it is only in some obscure, academic sense that one can say that the Pi has a serial port.

You've just demonstrated that it is not a serial port in any sense that anyone could actually use it (without further, external circuitry).

P.S.  I've also seen discussion here to the effect that the Pi does have a UART (which I've always thought of as being a part of a serial port), but again, it (this supposed UART) isn't "brought out" to the user in any useful sense.

P.P.S.  A (real) serial port would be nice - for debugging purposes - i.e., if the thing doesn't come up on the screen, you might, possibly, be able to get in via the serial port and see what's going on - but for practical purposes, most people who need (would like) a serial port will use a USB -> Serial adapter.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

RorschachUK
Posts: 12
Joined: Sun Jan 22, 2012 6:31 pm

Re: COM port

Sun Apr 15, 2012 7:48 am

In fact, the 'advanced setup' stuff about serial ports was included in error, as it was copied in from a page on the Wiki that originally referred to the Beagleboard not the RPi.

It's explained in this thread: http://www.element14.com/commu.....tart-guide

The source Wiki page (which says at the top that it's based on BeagleBoardBeginners and so the serial port stuff doesn't really apply) is here: http://elinux.org/RPi_Advanced_Setup

Conclusion - ignore the blurb about serial ports unless you really, really know what you're doing, because that information was meant to apply to BeagleBoards.

hippy
Posts: 5942
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: COM port

Sun Apr 15, 2012 2:26 pm

Joe Schmoe said:

P.S.  I've also seen discussion here to the effect that the Pi does have a UART (which I've always thought of as being a part of a serial port), but again, it (this supposed UART) isn't "brought out" to the user in any useful sense.
The UART is a serial port, just not RS232C voltage and polarity. It is brought out to the GPIO pins as TX and RX.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: COM port

Sun Apr 15, 2012 2:32 pm

mahjongg said:


real RS232 signals use +8 Volt and -8 Volt as signaling levels


It"s a pedantic point, but real RS232C uses +/- 12V. However the receive threshold is at +3V, so it will inter-work with a lot of different voltages. For example the serial port on the BBC Micro was RS423, which used +/- 5V. Most of the time it worked OK as if it was RS232.

However it will not inter-work with the RaspPi, which doesn't have the right drivers or signal sense, and wont cope with a 12V incoming signal.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12217
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: COM port

Sun Apr 15, 2012 3:36 pm

rurwin said:


mahjongg said:


real RS232 signals use +8 Volt and -8 Volt as signaling levels


It"s a pedantic point, but real RS232C uses +/- 12V. However the receive threshold is at +3V, so it will inter-work with a lot of different voltages. For example the serial port on the BBC Micro was RS423, which used +/- 5V. Most of the time it worked OK as if it was RS232.

However it will not inter-work with the RaspPi, which doesn"t have the right drivers or signal sense, and wont cope with a 12V incoming signal.


Yes, I didn"t want to make this more complex than it already was. Most RS232 driver IC"s run of 5V and use an internal voltage doubler/inverter so the actual voltages are often + and – 10Volt.

Another important point is that RS232 drivers are inverters, so even if you use resistor divider to  convert +12V to +3 volt it would not work, you will need at least a single transistor, switched as logic inverter. with a base resistor (and probably a diode between base and collector to protect the transistor against -12V on its base) and a pullup to 3K3.

A similar transistor inverter can be used on the TXD line.

I object to the remark that the R-PI only has an RS232 interface in an academic sense!

its much easier/cheaper to add a RS232 port using the available UART than any other way (USB to RS232 device).  Also, the CTS and RTS handshake signals are also available using other GPIO pins, Board designs have already been published, and use only a few cm2 of board space, with the DB-9 connector taking the most space. Details are published elsewhere on this forum. Its definitely doable.

Where the UART shines, and will probably be used the most for, is to communicate directly (without RS232 level conversion inbetween) with another microcontroller, such as the gerboard does to connect an ATmega (as used in arduino"s) to the R-PI.

Also, the original comment on the farnell site was that the R-PI has a "serial port", which is strictly seen true, it just that a serial port isn't always using the RS232 protocol.

User avatar
Vindicator
Posts: 314
Joined: Sat Sep 17, 2011 11:10 pm
Location: Susanville Ca USA
Contact: Website

Re: COM port

Mon Apr 16, 2012 5:56 am

I would suggest that most of this does not belong in an absolute beginner forum at all as do you want absolute beginners frying their Raspi.

ABSOLUTE BEGINNER versus electrical engineer.

Most ,if not all of those pins are not buffered so they are not in the realm of beginners please do not encourage the early demise of Raspi's.

Respectfully there are other places more suited to these post.
If you are more worried about ,spelling, punctuation or grammar you have probably already missed the point so please just move on.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12217
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: COM port

Mon Apr 16, 2012 8:40 am

Electrical engineers also have to start somewhere, not all Raspberry PI users are only interested in software. And this is absolute beginners stuff for people interested in electronics. They have to be warned not to connect a RS232 signal directly to a pin, even if it says RxD.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: COM port

Mon Apr 16, 2012 11:35 am

mahjonggg: It sounds like we are all in agreement then.  You've proven admirably my statement that the RPi doesn't have an RS232 port in any useful (real world, not academic) sense.  Thank you.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12217
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: COM port

Mon Apr 16, 2012 11:50 am

Yes, I did.

The initial question was "does it have a COM: port", and it doesn't have that. (I agree, it doesn't have a COM: port in the PC sense).

But when people then comment and say it doesn't therefore have a serial port then they are wrong, it has one, for example to connect to another microcontroller, as used on the gertboard.

Problem is that kids may think the GPIO pin labeled RxD is a RS232 input pin, and it isn't.

We do not want kids that want to play with hardware penalized for their curiosity with a blown up Raspi. We want future hardware engineers too, not just computer users and programmers, so it is important to mention this tidbit. Even if you seem to think we should just say the Raspberry PI doesn't have a "COM: port", and leave it at that.

That wont help the curious kid, who sees TxD and RxD in the documentation.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23636
Joined: Sat Jul 30, 2011 7:41 pm

Re: COM port

Mon Apr 16, 2012 2:47 pm

Most 'kids', even computer literate ones, will never have heard of RS232....

And if they have, they will have used a USB->Serial converter. Which is by far the easiest route to take.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12217
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: COM port

Mon Apr 16, 2012 2:52 pm

Electronic literate ones, the ones that pick up a copy of Elektor in the library will have read about RxD (receive data) and TxD (transmit data), and know they refer to serial ports.

User avatar
RaTTuS
Posts: 10458
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: COM port

Mon Apr 16, 2012 3:31 pm

RxD and TxD can and do refer to more than serial ports
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12217
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: COM port

Mon Apr 16, 2012 3:57 pm

RaTTuS said:


RxD and TxD can and do refer to more than serial ports


Really? I"ve almost never heard these terms used for anything else than for serial communication (using a UART). Try googling for "RxD TxD", and results will be for serial ports. Google even offers "RxD TxD RS232" as its #1 search option.

RxD and TxD overwhelmingly refer to serial communication using a UART, most of all using RS232 as physical interface.

The only (very obscure) example I can think of is that the old PS/2 keyboard interface also used RxD and TxD, but that was also an example of a serial interface.

By the way, the discussion about the "RS232 breakout box" for the Raspi can be found here:

http://www.raspberrypi.org/for.....kout-board

Its in no way in an "academic subject".

lesliew
Posts: 29
Joined: Sun Jan 22, 2012 5:14 pm
Location: Melbourne, Florida

Re: COM port

Mon Apr 16, 2012 11:56 pm

This should be sufficient to get you a serial connection, I don't have my pi yet but have used one on these cables on a similar device.

http://www.amazon.com/Cable-No.....B000BI4HW8

The USB end has the circuitry built in, and will adjust the voltage of the Tx & Rx lines to 5V.

Basically you need to cut off the plug that goes to the phone handset and connect a header, that will plug into the correct pins on the GPIO. The three wires are Blue(GND), Green (RxD), and White (TxD), but these may vary if you are using a cable from another manufacturer.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12217
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: COM port

Tue Apr 17, 2012 12:10 am

Yes, the Nokia is simply another device that uses (non-inverted) logic level (UART) RxD and TxD signals, but make sure that the output signal (TxD or RxD depending on whether the cable is labeled as a modem or a PC) of the "cable" isn't really outputting 5V levels!

As the GPIO uses 3V3 levels, and does not tolerate 5V levels!

If as you say he "cable" is outputting 5V levels, then you need to use a resistor divider  to divide the 5V to 3V3 (2K2 and 3K3). 3V3 levels are normally fine to drive a 5V input, so nothing special is needed for the other connection.  The "minimal" solution is to put a 10K resistor in series, if using a resistor divider is too much of a bother, this will make sure the SoC isn't damaged by current flowing into the 3V3 power lines through the protection diodes in the GPIO.

User avatar
rew
Posts: 423
Joined: Fri Aug 26, 2011 3:25 pm

Re: COM port

Tue Apr 17, 2012 6:51 am

http://www.bitwizard.nl/catalo.....ucts_id=41

can be configured to do only 3.3V, compatible with the 'pi. That version 1.0 is out of stock, you'd get V2.0, where the board is a lot smaller.

(Tested to work with the raspberry pi!)
Check out our raspberry pi addons: https://www.bitwizard.nl/shop/

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12217
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: COM port

Tue Apr 17, 2012 4:57 pm

The link was not working, but I assume you were talking about this breakout box:

http://www.bitwizard.nl/catalo.....ucts_id=41

and yes, that one would work if you want to connect a PC via USB to the raspberry PI's serial port, for example to control Linux (through a SSH remote shell) with a terminal emulator.

Return to “Beginners”