Sie sind auf Seite 1von 10

Introduction:

This page describes the basics of the RS232 serial communication standard which is used by all standard PCs, most pa the HP 100LX, 200LX, 1000CX and 95LX, which are described in detail here) and many peripheral devices, such as mod phones, mice, scientific equipment etc. You will also get concrete advice how to connect serial devices to your HP 200LX (or similar) palmtop. General RS232 information

RS232 describes the standard for serial data communication between PCs and peripheral devices, such as modems, m between PCs. Nowadays RS232 is replaced by USB more and more, but it is still an important standard, especially in th mobile devices, such as palmtop PCs and mobile phones.

There are two kinds of devices (from the viewpoint of RS232 communication): DTE and DCE. DTE stands for Data Term Equipment and means the"terminal devices", i.e. the PC or a simple terminal or in our case the palmtop; in general a keyboard and a screen for manual data input and output. Printers are also DTE, because they act similar to a screen. DCE stands for Data Communication Equipment, i.e. modems, mobile phones etc. To be honest, I cannot say for sure or DCE. Does someone know?

You can connect two devices with RS232 in three combinations: The usual connection is a DTE-DCE connection, e.g. if you connect a modem to your PC. This is done with a straight-th cable. The other kind of common connections is a DTE-DTE connection, for instance, if you connect two PCs in order to exch between them. For that kind of connection you need a so-called null modem cable. The third kind of connections is DCE-DCE. You need a so-called tail circuit cable for that, but since this is a very uncom connection, I wont describe it here.

Other parts of the RS232 specification:

Signal voltages: -5V to -15V (logical 1), +5V to +15V (logical 0) on the sender side, -3V to -15V (logical 1), +3V t 0) on the receiver side. Typically on a standard PC +/-12V is used.

Maximal cable length: 50 feet at 19200 bps, 3000 feet at 2400 bps (you can go much higher without troubles

Connectors: The most common RS232 connectors are the DB-9 and DB-25. They exist each as male and as fem in most cases the DTE has a male and the DCE has a female connector (although this can be different in some

The 200LX serial port looks like this. It is also a DTE device:

[backup battery, IR] [1 2 3 4 5 ] [12V DC jack] [6 7 8 9 10]

Signals: The following table is valid for the connectors on all DTE devices, including the 200LX palmtop, since i is identical to the DB-9 pin assignment standard: DB-9 / | DB-25 | Signal | Direction | Description 200LX | | | |

-------+---------+----------+---------------+---------------------------1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | 8 | DCD | Modem -> PC | Data Carrier Detect 3 | RxD | Modem -> PC | Received Data (by DTE) 2 | TxD | PC -> Modem | Transmitted Data (by DTE) 20 | DTR | PC -> Modem | Data Terminal Ready 7 | GND | | Signal Ground

6 | DSR | Modem -> PC | Data Set Ready 4 | RTS | PC -> Modem | Request To Send 5 | CTS | Modem -> PC | Clear To Send 22 | RI | Modem -> PC | Ring Indicator 1 | prot.GND | | | | Not on the DB-9. Protective ground: | Shield of plugs and cable are connected here

The DB-25 has much more signals, such as a second transmission set, but they will not be described here. DCD, DTR, DSR, RTS and CTS are so-called handshaking lines, which the devices use to exchange information about th are needed and used depends on the kind of data transmission you run and on the software which handles the transm section below you can read more about handshaking. For a detailed explanation of the signals please click here!

If you want to learn more about the RS232 standard please refer to RS232 references on the Internet, or read this ve summary by Chris Blum (uart.txt, 100kB). Anomalies of the serial port of the HP 200LX

Connector: The 200LX needs a special connector, see above. The pin numbering is identical to the numbering connector. In addition it has a pin 10, which you can connect to the shield of cables and plugs. Please dont co 5 (signal ground), since some power supplies of PCs are defective and thus the metal housing (which is connec shields) may lead a high voltage which could damage the serial port electronics. If you want to build your own plug which fits into that connector, please see here.

Signal voltages: The 200LX is a battery-driven device, which is designed to save power whereever it can. So it serial port. The signal voltages are lower than on standard PCs, namely up to about +/- 6V idle voltage. This st RS232 specifications, but it may lead to problems if you connect power-hungry devices which are powered by So some mice or other pointing devices dont work and especially some data cables for cellular phones may h this, if they are powered by the computer, not by the phone. Also the maximal cable length may be reduced by these low signal voltages.

UART: In modern PCs the 16550A UART (Universal Asynchron Receiver / Transmitter) is used which has a FIFO The palmtop only has a 16450 compatible UART and thus has no FIFO buffer. That is the reason why the maxi which data can be transmitted at over the serial port may be limited depending on the way the software is pr a very effectively programmed software (assambler-written) you can still use 115.200 bps if your palmtop has speed upgrade. With a single speed palmtop 57.600 bps should work. If you use more complex software pack WWW/LX or Nettamer, you may be limited even more in transmission speed. 38.400 bps (double speed) or 19 speed) should always work without problems, even if the processor has much more to do than sending and re over the serial port.

Power management: The serial port of the palmtop can be switched off to save power (the driver chip of the power whenever it is not explicitly switched off). If the port is not used, it should be switched off to save powe want to use it, you must make sure it is switched on, otherwise some software may run into troubles saying th connected or a driver is missing or similar things. The power of the serial port can be controlled by the built-in type in (or use in a batch file) serctl /w to switch the serial port on and set it to "wired" and use serctl /o to sw again. serctl /i switches the port on and sets it to use the IR interface instead of the wired port. LXPRO by Stefan Peichl is a TSR which can control the serial port via hotkey (and many other useful things), SE written by Stefan Peichl and can be used in batch files to control the serial port just as serctl does, but you can the port speed and bit patterns.

Cables and adapters for use in serial communication lines Here various kinds of cables and adapters are described, including 200LX-specific ones:

The staight-through serial cable The null modem cable or adapter The 9pin to 25pin adapter The gender changer The 200LX connectivity kit cable The serial to parallel converter

The straight-through serial cable

This cable is mostly available with 25 pin connectors (DB-25) on both sides. It has one male and one female connector establish any DTE-DCE connection with it, since it connects all pins exactly 1:1. In case one of the ports you want to co pins, you need a 9pin-to-25pin adapter. There are also 9pin-to-25pin cables and 9pin-to-9pin cables available, though The null modem cable or null modem adapter:

This one comes in many variations. What they all have in common is that the RxD and TxD lines are crossed, so you ca DTE-DTE connection with them (e.g. connect a palmtop to a PC to exchange data between them). Some of these adapters or cables dont have any more lines than RxD, TxD and ground, these are the cheap ones. Oth called loopback handshaking in the plugs, so handshaking is only faked for software which fails without signals on the lines. This is no real handshaking of course. If one device wants to say to the other one "I am ready, please do your job says that to itself. Vice versa, if a device is told to do its job by the line which says "the other device is ready", it actual itself is ready. In more detail, when loopback handshaking is used, on every side the lines DCD (1), DTR (4) and DSR (6) connected and so are RTS (7) and CTS (8). You should usually prefer real handshaking, so you should use a partially or full-featured handshaking null modem ca This one has all handshaking lines, and these are also crossed in the correct way. See circuits below. If you cannot use null modem for some reason, make sure to enable software flow control ("Xon/Xoff") on both ends in the software y replaces the RTS/CTS hardware handshaking mechanism. You can read more about handshaking in the section Handshaking mechanisms at the bottom of this document. Null modem cables and adapters come with almost any combination of connectors on both ends. Try to find one whic needs, so you dont have to buy expensive gender changers or 9-25-adapters. Following you see a few circuit layouts of null modem cables:

"dumb" null modem without handshaking (only 3 wires needed)

loopback handshaking null modem (also only 3 wires needed)

partial handshaking null modem (7 wires needed, RTS and CTS of one party are connected to DCD of the other party)

full-featured null modem (8 wires needed, the safe choice, RI is not connected, usually it is not needed. Connect it too

The null modem adapter which comes with the connectivity pack of the 200LX is a full-featured null modem adapter a DB-9 on the ends ("5181-6639"):

And this is a full-featured mini null modem adapter (one male and one female DB-9 end):

The 9 pin to 25 pin adapter These have usually all lines which are available in a DB-9 connector. They simply map the 9 pin layout to the correspo 25 pin connector. They have either a male DB-9 and a female DB-25 or vice versa:

The Gender Changer

Gender changers simply change the sex of a plug. Their wiring is 1:1 and there are 2 kinds: Female to Female and Male to Male. They can have either DB-9 or DB-25 connectors on their ends, I have also seen some which have DB-9 on ont side and other side. The latter ones are combined 9pin-to-25pin-adapters and gender changers. Here are examples of a 25pin male and a 9 pin male gender changer:

The 200LX connectivity cable (F1015A)

This is not a serial cable, but a full-featured null modem cable with a 200LX plug on one end and a female DB-9 on the designed to connect the palmtop to a PC. So, if you want to connect a modem, a mouse or a cellular phone (or any ot is usually connected to the serial port of a PC) to the palmtop, you need one more full-featured null modem adapter i cable to re-do the null modem wire crossings. Such a null modem adapter comes with the HP connectivity pack. Read information.

A short 1:1 serial adapter for the 200LX You can easily add a "standard" serial port (i.e. a male DB-9 connector) to the palmtop, so that you can simply plug in you can also plug into a serial port of a PC. Either build the adapter yourself, it could look like mine:

(simply connect all pins 1:1, instructions to make a 200LX plug are available here), or buy such an adapter from Runde (Item #1098). The serial to parallel converter

This is an active electronic device, which converts serial data into parallel data (but usually not vice versa! You need a "bidirectional" serial to parallel converter to have both directions of conversion). It is needed if you want to connect e printer to the palmtop. Such a converter is expensive (usually 30 .. 100 US$) and available either as one box with two a cable with a box on one end. A cable which fits directly into the 200LX serial port is offered by Thaddeus Computing converters have one DB-25 connector on the serial input end and a Centronics parallel printer interface on the other e these converters are unidirectional, that means, they cannot be used for bidirectional parallel devices (such as Iomega Memory card readers etc.) and the data transmission may be limited by the 200LX serial port. Try with 9600 bps and g

higher until you dont notice any speed improvement. Take care that you can adjust the speed of the converter, e.g. w If you cannot, the speed is probably hard-wired to 9600 baud.

How to connect device X to the palmtop

This section describes what you need in order to connect a specific device (or a kind of device) to the palmtop HP 200

Another PC A modem A cellular phone (as a modem) A pointing device (e.g. mouse) A serial printer A parallel printer

Another PC (for file transfer or Internet connection sharing)

You only need the HP connectivity cable. Maybe you need a 9pin to 25 pin adapter on the PC side. You have several options of software to use if you want to transfer data between the palmtop and the PC over the ser

Filer on the palmtop, Total Commander with HPLX communication plugin on the Windows-PC (very reliable a fast, recommended!)

Filer on the palmtop, Transfile Win200 on the Windows-PC (easy to set up and to use, but some shortcomings MS-DOS Interlink / Interserver (interlnk, intersvr), comes with MS-DOS Laplink Remote Access (you had to buy a copy for the PC) ZIP (this is not PKZIP!) (very fast and reliable command-line tool) X-Finder and X-Finder Server (said to be very reliable and fast) Kermit (command line tool) Win32 Filer (connection between a Windows PC and the palmtops filer application) Norton Commander offers a file transfer connection, similar to the filer of the palmtop

...and probably many others. Please note that the palmtop may not be able to handle high-speed transmission, depen

of software you use and the clock speed of the palmtop the data rate may be limited to 57600, 38400 or even 19200 b

You can also use the connection to another PC to share one Internet connection between this PC and your palmtop. have to run a program on the PC which lets you use the existing Internet connection of the PC (no matter if via modem ATM, wireless LAN or whatever) over a PPP connection over the serial port. Such software exists for Windows 9x and MochaPPP. If you run Linux on your PC, you can easily configure IP masquerading, IP forwarding (with iptables) and th server for the serial line. Please visit my Internet connection sharing page for detailed instructions!. A modem

You need either The 200LX connectivity cable, a full-featured (!) null modem adapter and a serial cable (the serial cable usually come modem), or you need: A 1:1 serial adapter and a serial cable. You may also need a gender changer and / or a 9pin-to-25pin-adapter if something doesnt fit together. Regarding Internet and fax software recommendations, please have a look onto my mobile-hplx page! A cellular phone

(Please note that you can also connect a cellular phone via IrDA to the LX, if the phone is IrDA capable!) You need either The 200LX connectivity cable, a full-featured (!) null modem adapter and the phone-specific data cable, or you need: A 1:1 serial adapter and the phone-specific data cable. You may also need a gender changer and / or a 9pin-to-25pin-adapter if something doesnt fit together. Regarding Internet and fax software recommendations, please have a look onto my mobile-hplx page! Please note also that there are problems with some phone-specific data cables. Some data cables dont use the DCD l cause problems, and some data cables are designed to be powered by the PCs serial port, which can cause problems much power. For further information have a look onto my mobile-hplx page. A pointing device (e.g. a mouse)

Why could someone want to use a mouse with the palmtop? Well, there are a few possibilities: MS-Windows 3.0 can palmtop in real-mode (the picture shows a mouse with a self-made connector, not with the cables described here), so MS-Word 1.1 and MS-Excel 1.0. There are also CAD and drawing programs which run on the palmtop. You need either The 200LX connectivity cable, and a null modem adapter or you need: A 1:1 serial adapter. You may also need a gender changer and / or a 9pin-to-25pin-adapter if something doesnt fit together. Dont forget to load a suitable mouse driver and note that the serial port has to be switched on all the time during the loaded and you use the mouse. The best option is to do that in a batch file. Say, your application which uses a mouse, app.exe and your mouse driver is mouse.com and can be unloaded with mouse.com /u. Then you should always start following batch file: @echo off serctl /w

mouse.com app.exe mouse.com /u serctl /o

This makes sure the serial port is always ready for the mouse and the driver can instantly see the mouse. Technical info: Most mice use the TxD, RTS and DTR lines as power supply. The PC receives the mouse signals via RxD. needed, of course. A serial printer

I have never done that, so I can only explain theoretically: You need either The 200LX connectivity cable, and a 9-to-25-adapter (or the "printer adapter" which comes with the connectivity pac be a simple 9-to-25-adapter) or you need: A 1:1 serial adapter and a null modem cable You may also need a gender changer and / or a 9pin-to-25pin-adapter if something doesnt fit together. A parallel printer You need either: The 200LX connectivity cable, a null modem adapter and a serial to parallel converter, or you need the "Greenwich cable", which is sold by Thaddeus Computing. or you can use one of the programs OMNIPRN and COM2LPT to use a printer which is connected to your desktop PC. then acts as a serial to parallel converter. A Thermometer You need the instructions to build a palmtop thermometer ;-). Please see here. The serial port of the HP 95LX

The HP 95LX has only 4 pins (ground, TX, RX, shield). You can use a female connector with 4 pins in 1 row (2mm grid) a 95LXs port. Such a connector can be found for example as CD-ROM audio connector (These flat black ones). If you look on the serial port of the 95LX, the pins lead the following signals: _______________ |A|B|C|D| \_____________/

A: shield ground (if connected to a standard DB9 connector: connect it to the housing) B: TX C: RX (Pin 3 of a standard DB9 connector) (Pin 2 of a standard DB9 connector)

D: signal ground (Pin 5 of a standard DB9 connector)

If you want to make a normal serial cable (e.g. to connect a modem to the 95LX), use the wiring described above for t connector. To make a null modem cable (e.g. to connect the 95LX to another PC for data transfer), swap pins 2 and 3.

With that information and combined with the tables and drawings above, you should be able to build any cable you n 95LX. But be aware that because of the missing control lines, some software could get into trouble. This can probably "software flow control" is enabled on both sides (XON/XOFF), since the hardware flow control lines (CTS/RTS) are mis Handshaking mechanisms For serial data transmission, there are two kinds of handshaking:

Hardware handshaking (RTS/CTS) and Software Handshaking (Xon/Xoff)

Independant from that, there are two more control lines: DTR and DSR. They are only important at the beginning and data transmission. This is also called "handshaking", but doesnt mean the handshaking during the data transmission.

DTR/DSR: These control lines assure that there are really two devices present which want to communicate wi First, the DTE sets DTR "high", then the DCE answers setting DSR "high". These two lines are kept high during the whole transmission process. If the transmission has to be interrupted modem hang-up for example), the DCE drops the DSR to "low" so the DTE knows the transfer is finished.

RTS/CTS: These are the actual flow control lines: The sender sets RTS "high" (ready to send), the receiver answ (clear to send) to "high". If the receiver needs a pause (buffer overflow, for example), if drops CTS to "low", so knows it has to wait with further transmission until the receiver has set CTS "high" again. This way it is assured lost.

Xon/Xoff: This method can be used if no RTS/CTS lines are available. It is simple: If the receiver cannot handle to a buffer overflow, for example), it sends the Xoff character (Ctrl-S, ASCII 0x13) to the sender, so the sender wait with further transmissions until the receiver sends the Xon character. If the receiver is ready again, it sen ASCII 0x11) and the sender continues to send data.

the DCD line is only used by modems. It is set to "high" by the modem to let the computer know it has detecte tone of the modem on the other side (i.e. it has a connection to the other side).

Das könnte Ihnen auch gefallen