Archived 2013-12-08
This page has been archived and some links may not work correctly anymore. No updates of this page will be done anymore.
 

Information about RS232 serial communication / how to connect serial devices to the Palmtop HP 200LX

 
See also these useful resources:

HP connectors and link cables: http://www.keesvandersanden.nl/calculators/link_cables.php
The HP Cable Table: http://holyjoe.org/hp/cable.htm

 

Contents of this page:


Introduction:

This page describes the basics of the RS232 serial communication standard which is used by all standard PCs, most palmtop PCs (e.g. the HP 100LX, 200LX, 1000CX and 95LX, which are described in detail here) and many peripheral devices, such as modems, cellular 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, mice etc. and between PCs. Nowadays RS232 is replaced by USB more and more, but it is still an important standard, especially in the world of 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 Terminal Equipment and means the "terminal devices", i.e. the PC or a simple terminal or in our case the palmtop; in general a device with 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 if mice are DTE 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-through 1:1 serial cable.
The other kind of common connections is a DTE-DTE connection, for instance, if you connect two PCs in order to exchange data 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 uncommon kind of connection, I won´t 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 to +15V (locical 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 in most cases)
      • Connectors: The most common RS232 connectors are the DB-9 and DB-25. They exist each as male and as female variations, in most cases the DTE has a male and the DCE has a female connector (although this can be different in some cases).

        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 its pin numbering is identical to the DB-9 pin assignment standard:
        DB-9 / |  DB-25  |  Signal  |  Direction    |  Description
        200LX  |         |          |               |
        -------+---------+----------+---------------+----------------------------
            1  |      8  |    DCD   |  Modem -> PC  |  Data Carrier Detect
            2  |      3  |    RxD   |  Modem -> PC  |  Received Data (by DTE)
            3  |      2  |    TxD   |  PC -> Modem  |  Transmitted Data (by DTE)
            4  |     20  |    DTR   |  PC -> Modem  |  Data Terminal Ready
            5  |      7  |    GND   |               |  Signal Ground
            6  |      6  |    DSR   |  Modem -> PC  |  Data Set Ready
            7  |      4  |    RTS   |  PC -> Modem  |  Request To Send
            8  |      5  |    CTS   |  Modem -> PC  |  Clear To Send
            9  |     22  |    RI    |  Modem -> PC  |  Ring Indicator
           10  |      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 their status. If they are needed and used depends on the kind of data transmission you run and on the software which handles the transmission. In the 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 very complete TTY 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 of a DB-9 connector. In addition it has a pin 10, which you can connect to the shield of cables and plugs. Please don´t connect that to pin 5 (signal ground), since some power supplies of PCs are defective and thus the metal housing (which is connected to all 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 does on the serial port. The signal voltages are lower than on standard PCs, namely up to about +/- 6V idle voltage. This still meets the RS232 specifications, but it may lead to problems if you connect power-hungry devices which are powered by the port itself. So some mice or other pointing devices don´t work and especially some data cables for cellular phones may have trouble with 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 buffer built-in. The palmtop only has a 16450 compatible UART and thus has no FIFO buffer. That is the reason why the maximum speed which data can be transmitted at over the serial port may be limited depending on the way the software is programmed. With a very effectively programmed software (assambler-written) you can still use 115.200 bps if your palmtop has the double-speed upgrade. With a single speed palmtop 57.600 bps should work. If you use more complex software packages such as WWW/LX or Nettamer, you may be limited even more in transmission speed. 38.400 bps (double speed) or 19.200 bps (single speed) should always work without problems, even if the processor has much more to do than sending and receiving data over the serial port.
  • Power management: The serial port of the palmtop can be switched off to save power (the driver chip of the serial port drains power whenever it is not explicitly switched off). If the port is not used, it should be switched off to save power. But if you want to use it, you must make sure it is switched on, otherwise some software may run into troubles saying that no device is connected or a driver is missing or similar things. The power of the serial port can be controlled by the built-in program serctl. 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 switch the port off 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), SETCOM1 is also written by Stefan Peichl and can be used in batch files to control the serial port just as serctl does, but you can in addition set 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 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. You can establish any DTE-DCE connection with it, since it connects all pins exactly 1:1. In case one of the ports you want to connect has only 9 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 can establish a DTE-DTE connection with them (e.g. connect a palmtop to a PC to exchange data between them).
Some of these adapters or cables don´t have any more lines than RxD, TxD and ground, these are the cheap ones. Others have so-called loopback handshaking in the plugs, so handshaking is only faked for software which fails without signals on the handshaking 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", it actually 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 actually is told that itself is ready. In more detail, when loopback handshaking is used, on every side the lines DCD (1), DTR (4) and DSR (6) are electrically 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 cable / adapter. This one has all handshaking lines, and these are also crossed in the correct way. See circuits below. If you cannot use a full-featured null modem for some reason, make sure to enable software flow control ("Xon/Xoff") on both ends in the software you use. This 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 which fits your needs, so you don´t 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, if you need it!)

The null modem adapter which comes with the connectivity pack of the 200LX is a full-featured null modem adapter and has two male 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 corresponding pins of the 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 gender 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 DB-25 on the 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 other end. Is is designed to connect the palmtop to a PC. So, if you want to connect a modem, a mouse or a cellular phone (or any other device which is usually connected to the serial port of a PC) to the palmtop, you need one more full-featured null modem adapter in series to this cable to re-do the null modem wire crossings. Such a null modem adapter comes with the HP connectivity pack. Read on for more 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 any device which 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 Rundel Datentechnik (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 so-called "bidirectional" serial to parallel converter to have both directions of conversion). It is needed if you want to connect e.g. a parallel printer to the palmtop. Such a converter is expensive (usually 30 .. 100 US$) and available either as one box with two connectors or as a cable with a box on one end. A cable which fits directly into the 200LX serial port is offered by Thaddeus Computing. Usually these converters have one DB-25 connector on the serial input end and a Centronics parallel printer interface on the other end. Most of these converters are unidirectional, that means, they cannot be used for bidirectional parallel devices (such as Iomega ZIP drives, Memory card readers etc.) and the data transmission may be limited by the 200LX serial port. Try with 9600 bps and go higher and higher until you don´t notice any speed improvement. Take care that you can adjust the speed of the converter, e.g. with DIP switches. 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 200LX.

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 serial line:

  • Filer on the palmtop, Total Commander with HPLX communication plugin on the Windows-PC (very reliable and fast, recommended!)
  • Filer on the palmtop, Transfile Win200 on the Windows-PC (easy to set up and to use, but some shortcomings in usability)
  • 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 palmtop´s 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, depending on the kind of software you use and the clock speed of the palmtop the data rate may be limited to 57600, 38400 or even 19200 bps.

You can also use the connection to another PC to share one Internet connection between this PC and your palmtop. This means you have to run a program on the PC which lets you use the existing Internet connection of the PC (no matter if via modem, DSL, Ethernet, ATM, wireless LAN or whatever) over a PPP connection over the serial port. Such software exists for Windows 9x and is called MochaPPP. If you run Linux on your PC, you can easily configure IP masquerading, IP forwarding (with iptables) and the pppd as PPP 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 comes with the 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 doesn´t 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 doesn´t 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 don´t use the DCD line, which can cause problems, and some data cables are designed to be powered by the PC´s serial port, which can cause problems if they need too 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 be run on the palmtop in real-mode (the picture shows a mouse with a self-made connector, not with the cables described here), so you could use 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 doesn´t fit together.
Don´t forget to load a suitable mouse driver and note that the serial port has to be switched on all the time during the mouse driver is loaded and you use the mouse. The best option is to do that in a batch file. Say, your application which uses a mouse, is named app.exe and your mouse driver is mouse.com and can be unloaded with mouse.com /u. Then you should always start app.exe with the 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. GND is also 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 pack, this seems to 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 doesn´t 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. The 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) as a plug for the 95LX´s 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              (Pin 3 of a standard DB9 connector)
C: RX              (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 the DB9 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 need for the HP 95LX. But be aware that because of the missing control lines, some software could get into trouble. This can probably be avoided if "software flow control" is enabled on both sides (XON/XOFF), since the hardware flow control lines (CTS/RTS) are missing.

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 the end of a data transmission. This is also called "handshaking", but doesn´t mean the handshaking during the data transmission. See below.

 

  • DTR/DSR: These control lines assure that there are really two devices present which want to communicate with each other: 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 (because of a 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 answers setting CTS (clear to send) to "high". If the receiver needs a pause (buffer overflow, for example), if drops CTS to "low", so the sender knows it has to wait with further transmission until the receiver has set CTS "high" again. This way it is assured that no data is lost.
  • Xon/Xoff: This method can be used if no RTS/CTS lines are available. It is simple: If the receiver cannot handle more data (due to a buffer overflow, for example), it sends the Xoff character (Ctrl-S, ASCII 0x13) to the sender, so the sender knows it has to wait with further transmissions until the receiver sends the Xon character. If the receiver is ready again, it sends Xon (Ctrl-Q, 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 detected the carrier tone of the modem on the other side (i.e. it has a connection to the other side).

Archived 2013-12-08
This page has been archived and some links may not work correctly anymore. No updates of this page will be done anymore.

Contents of this page:

 


 

About LXTeX 2e

The first steps to compose a distribution of LaTeX for the HP palmtops were done by Stephan Lüttjohann and Hans Hönen. They brought up a version of LaTeX 2.09 for the palmtop. Click here to get to Stephans´s site where LxTeX "version 1" can be downloaded.

LXTeX 2e is an adaption of emTeX (LaTeX 2e for DOS) made by me especially for the HP palmtops. You can use it on your palmtop if you have at least 6 MB free disk space. I recommend that you only run it on a double speed upgraded palmtop, otherwise the process of generation of fonts (by Metafont) is terribly slow (but it works on a single speed palmtop, too). On my double-speed palmtop it takes about 5 minutes to generate one font. But fortunately each font only has to be generated only once.

If LXTeX seems to be overkill for your needs (and LaTeX / LXTeX is hard to learn for someone who is used to graphical text processors like MS Word), have a look at LXRTF, which is a tool to generate Rich Text (RTF) files on the palmtop. 

Download LXTeX 2e

CLICK HERE

Installation:
Unzip the downloaded big archive file and then unzip the contained LXTEX.ZIP. Afterwards:
Unzip the LXT2E13.ZIP file with the -d option (if you use PKUNZIP), so that all subdirectories are created.

Please read the README.TXT file in the main directory of the unzipped archive carefully: There you´ll find installing instructions, configuring instructions and a little guide how to use LXTeX2e. Additionally it contains the directory PRN_CONF, which includes batch and data files for different printers. By default LXTeX is configured to print to a Canon Bubblejet printer.

If you would like to get more information about the LaTeX system and its components, please read the numberous doc files that come with LaTeX (emTeX). They were included in the LXTeX ZIP file until version 1.1, now I have split it up into two files: LXT2E13.ZIP contains LXTeX with all needed files and EMTEXDOC.ZIP contains the relevant DOC files which come with emTeX. The files in the EMTEXDOC package are not needed to run LXTeX, i.e. do not have to be installed on the Palmtop. 

LXTeX 2e additional packages

Here is a list of optional packeges you can install to get additional features.

DINBRIEF

- this is a stripped-down version of the DINBRIEF package made by University of Karlsruhe. It is a document class for German letters according to the DIN 676. With template, nice letter head and documentation. Unzip into an extra directory and read lxt_inst.txt. Click here to see how this document class with the letter-head look like (30 kB PNG graphic). The DINBRIEF package is included in the ZIP file you can download above.

LXTeX 2e Frequently asked questions

LXTeX is too complicated for me! I need a simpler solution to create professionally formatted text on the palmtop!

Take a look at LXRTF!

 

I do not know how to configure LXTeX so that it works...

Please read the README.TXT file, which comes with LXTeX. It describes most situations which can occur.

 

Using other printers than Canon BJ

If you have another printer than a Canon Bubblejet, for which LXTeX is preconfigured, please read section 3.6.2 (A:\EMTEX\BIN\PR.BAT) of the README.TXT. It describes how to change printer configuration. If your printer isn´t covered by the options of the DVI drivers, either look for a newer DVI driver or see if your printer can emulate one of the supported printers. If nothing like that is possible, you may as well use a PC LaTeX installation to print your files generated on the Palmtop. See below.

 

TeX capacity exceeded

If you get this error message, try to shorten some macros or maybe don´t use macros at all, rather include the full LaTeX command string defined by the macro everywhere you used the macro. Clumsy, but might help to avoid the error.

 

Metafont takes incredibly long to generate fonts! How to speed that up?

On a double-speed upgraded palmtop, Metafont takes about 5 minutes generating one font. See section 4.3.4 (Preview) in the README.TXT. You can avoid generation of most fonts if you put a font library file (*.FLI) into the %EMTEXDIR%\FONTS directory. Find the *_BASE.FLI file which suits your printer (if you only preview on the palmtop and don´t print at all, take the BJ_BASE.FLI, LXTeX comes preconfigured for this one). You can find the FLIs on ftp.dante.de.

 

I get the error message A program started an invalid instruction... and the palmtop locks up. What to do now?

This is a serious error which seems to be related to the palmtop´s light sleep mode. I tried to avoid occurence of that error by deactivating light sleep during Metafont runs in the batch files which come with LXTeX, since Metafont seems to be the only program having trouble with this. If you get this error in a reproducable way, please let me know, then we can try to work out a solution. This error usually needs a cold boot (Ctrl-Shift-On), since it locks up the palmtop entirely.

 

BIBTEX

If you install the original BIBTEX4b package, there are some important things you should pay attention to:

      • You can delete %EMTEXDIR%\BIN\BIBTEX32.EXE to save disk space
      • BIBTEX does not like light sleep mode (same problems as with Metafont)! So if you call BIBTEX, no matter if manually or via batch file, make sure to deactivate light sleep before BIBTEX is called (command setit lf) and reactivate it after BIBTEX ran (command setit lo). See how this is done for Metafont, called by the DVIDRV, in %EMTEXDIR%\BIN\PR.BAT or %EMTEXDIR%\BIN\VS.BAT.

I forgot to switch off the palmtop, and it didn't switch off itself, now batteries are empty and I lost valuable data!

The light sleep mode, and thus the power-off time-out of the palmtop are deactivated as soon as you start a DVIDRV (eit viewer or the printer driver). If printing or viewing is finished, light sleep is reactivated. Thus it is not safe to leave the palmtop alone while viewing a DVI file!! Quit the viewer, then go away!

 

Printing does not work!

The DVIDRV prints to the interface PRN, which is mapped to COM1 on the palmtop (BTW, also LPT1 seems to be mapped to COM1 automatically). With a serial printer, there should be no major problem, only make sure the baud rates are properly set, and handshaking is enabled (and, of course, that you use the correct DVI driver and fonts!)

If you have a parallel port printer, you need a serial -> parallel converter. Most cheaper converters are hard-wired to 9600 baud. More expensive ones can be configured via dip switches to different baud rates and different handshaking methods. I have done some tests with such a configurable one, and the results were, that fastest printing is possible with 57600 baud and XON/XOFF handshaking. To make the printer driver use the correct baud rate, set the SETCOM1 line in %EMTEXDIR%\BIN\PR.BAT correctly. Also read section 3.6.2 (PR.BAT) of the README.TXT which comes with LXTeX.

You can also try to add the option /ox+ to the dvidrv line in pr.bat. This option enables XON/XOFF handshaking.

Please see also my RS232 pagewhich talks about connecting devices (also printers) to the palmtop.

 

How can I print if I do not have a serial port printer or a serial to parallel converter?

There are some ways:

  • Use the printer connected to your desktop PC, connect the palmtop via serial cable to the desktop PC and run a program on the desktop PC which hands over data from the serial port directly to the parallel port. Such programs are e.g. OMNIPRN or COM2LPTIf you have a printer with an IrDA interface, try the IrDA DOS printer driver 
  • Another approach might be to use the dvidot fax configuration to create a fax-format output and then use a fax program to "print" the output to a fax machine. All you need to create fax-formatted output is included with LXTeX 2e.

 

I often forget to enter LaTeX-specific codes for special characters, and LaTeX complains!

Simply add a search and replace tool which helps you to avoid such problems! I have, for example, the following lines in texedit.bat:

@echo off
echo calling editor...
pe %1.tex
echo converting Umlauts in %1.tex...
sed -f %EMTEXDIR%\bin\utility\conv_uml.sed %1.tex > %1.tmp
if errorlevel 1 pause
if errorlevel 0 copy %1.TMP %1.TEX
echo done.



i.e. after the editor has been exited, sed, the stream editor, is called using a sed script conv_uml.sed, which contains the sed commands to replace the umlauts. The sed script conv_uml.sed looks like this:

s/ä/"a/g
s/ö/"o/g
s/ü/"u/g
s/Ä/"A/g
s/Ö/"O/g
s/Ü/"U/g
s/ß/"s/g

All German Umlauts are thus replaced by their LaTeX German-package representation after each editing of the tex source file, i.e. if an ä is found, it is replaced by "a, ß is replaced by "s and so on. You need the stream editor sed for that task. It is available on the SUPER site. Simply put sed.exe into any utility directory on your palmtop which is in the PATH, or put it into %EMTEXDIR%\BIN\UTILITY. Actually, if you have the line \usepackage[cp850]{inputenc} (or as the number after "cp" whatever codepage you use on your palmtop) in your TEX source preamble, the Umlauts should be directly accepted in the input file, but the tex file would not be as portable anymore. And if you often switch codepages on your palmtop, you will probably get into trouble either. So the search and replace solution is better, in my opinion. And it is quite fast using sed.

 

I want to make a PDF file from my LXTeX document!

No problem, if you have access to a Linux or Windows computer: Put a \usepackage{times} into the tex file preamble, that is necessary because otherwise the Computer Modern fonts used by TeX had to be embedded as pixel fonts into the PDF file, and that looks ugly and blows up the PDF file in size. When using the times package, the Times fonts are used, which are Adobe standard fonts. Don't try to compile the tex file with \usepackage{times} on the palmtop - the times package is not installed there. Then put the tex source file onto the linux machine, do latex document.tex and then dvipdf document.dvi or dvipdfm docuent.dvi. This should give you an amazingly small good looking PDF file, readable with Acrobat Reader on any platform.

Archived 2013-12-08
This page has been archived and some links may not work correctly anymore. No updates of this page will be done anymore.

Easily create fully formatted text documents or even simple Powerpoint presentations directly on the HP Palmtop!

Contents of this page:


About LXRTF

LXRTF is a software package which allows creation of formatted text on the HP DOS palmtops (100LX, 200LX, 1000CX, 700LX, 95LX).

LXRTF works the following way:

  1. You write your document as a plain text file with simple formatting commands
  2. You call LXRTF, which translates this file into the RTF format
  3. The resulting RTF file can be opened in almost every text processing software on any operating system

RTF-compatible text processors are for example:

  • MS Word for Windows
  • MS Word for DOS
  • MS Word for Macintosh
  • Wordpad (coming with various versions of Windows)
  • OpenOffice
  • LibreOffice
  • KOffice
  • TextMaker
  • Mac OS text editor
  • ..and many more.

Since version 1.2, LXRTF is even able to create RTF files compatible with MS PowerPoint. So it is now possible to prepare or even create simple MS PowerPoint presentations on the palmtop using LXRTF. Many thanks to Pavel Zampach for this great idea!

The high compatibility of the RTF format makes LXRTF the tool for anyone who needs to write formatted documents on the palmtop, which other people need to read on their Windows, UNIX or Mac computers.

LXRTF is designed to be as simple as possible while providing as many simple formatting features as possible. Sophisticated formatting such as mathematical formulas is not supported. If you need that, you should have a look at LXTeX (LaTeX for the HP palmtops).

In contrast to LXTeX, LXRTF is simple, fast, small and produces more compatible output.

Download, install and use LXRTF

CLICK HERE TO DOWNLOAD LXRTF

Installation:
Unzip the big archive file. Then unzip the contained LXRTF12.ZIP file into a dedicated directory, for example into c:\lxrtf. The file lxrtf.bat is the central program file. You need about 70 kB of free disk space for LXRTF.

Usage: Usage is simple: Write the document (e.g. infile.rtx) with a simple text editor. Then execute LXRTF: The command

lxrtf infile.rtx outfile.rtf

produces the RTF file "outfile.rtf" from your input file "infile.rtx".

For detailed information about formatting in LXRTF, please read the file 0README.TXT and have a look at the example files coming with LXRTF. An example is shown below.

Version history

New in Release 1.2

  • Support for Powerpoint compatible RTF format (introducing stylesheets). New command *Yn for slide title / items.

New in Release 1.1

  • Bugfix: Command for font color changed from *C to *O (*C was accidentally assigned to two functions: Color and Center-aligning!)

LXRTF Frequently asked questions

Why do I have to use commands? Why isn´t there a simple user interface such as Word with buttons for bold text, italics, font selection...?

This is because LXRTF is simple "translation" software (or call it a compiler). Creating a GUI (graphical user interface) would be possible, but it would mean much more work than just write a compiler program.

Why not use existing software, such as MS-Word for DOS?

I have looked for existing software which does what I need, but didn´t find any program, which lets me create formatted output in a file format, which my colleagues can read on their MS-Windows / MS-Word systems without the need of importing the file and maybe install exotic import filters first. Even the files MS-Word for DOS creates cannot be directly opened by newer Versions of MS-Word for Windows without the need to isntall additional filters etc. Additionally, MS-Word for DOS is slow on the palmtop and not very convenient to use, in my opinion. So I wrote LXRTF, mainly for my own needs.

How can I check on the palmtop if the formatting looks as I want it to look?

You can´t. You could open the resulting RTF file in MS Word for DOS (version 6.0 supports RTF well, I don´t know about lower versions). But on the palmtop, MS-Word only shows a subset of the formatting which is possible with LXRTF, so the exact layout is not visible on the palmtop. I have not tried MS-Word 1.0 for Windows on Windows 3.0, which runs on the palmtop, albeit very slow. This could work, if that version of Word supports RTF and if all used fonts are installed. Still, text colors won´t be visible of course.

Example

The following example shows what LXRTF does. First you see the input file (plain text with formatting commands) and below there is a screenshot of the output LXRTF produces from the input file, opened in Microsoft Word. Each formatting command begins with an asterisk (*).

*F3 *FS20
{*IDaniel Hertrich}
*R{*IHauptstra\se 98*\
12345 Berlin*\
Tel. +49 12 3456789*\
Mobile: +49 765 4321987*\
Email: This email address is being protected from spambots. You need JavaScript enabled to view it.}



*L{*UTo:}*\
Jack Palmtopper*\
Hewlett Street 700*\
Packard, 20095 LX*\
United States of America



{*BSubject: LXRTF test}


*RDecember 14th, 2003
*LDear Mr Palmtopper,


Please find here an example letter created with *ILXRTF*i.
This letter is written in manual formatting mode, the \*\\ command
is used and several times also some consecutive blank lines.
Please read the {*F1 0readme.txt} file for details about this method
of formatting.

Formatting is fun now, and the result can be opened with
all modern versions of MS Word or other text processors.


Once this program works without hassles, I will
publish it on my homepage, e.g, under 
{*F1*C3http://www.daniel-hertrich.de/lxrtf} or so.

If you find any problems with the program, please report them
to me. My email address is mentioned in the header of this
letter. If it should be obsolete, please look at*\
{*F1*C3http://www.daniel-hertrich.de/contact}.


Kind regards,

Daniel Hertrich

 

Output in MS Word (Click on the screenshot to view a higher-resolution version of the screenshot):

 

Archived 2013-12-08
This page has been archived and some links may not work correctly anymore. No updates of this page will be done anymore.

Contents of this page:

Introduction:

LXGLUC.wk1 is a (free) Lotus 1-2-3 worksheet for diabetes data management. It makes it possible to track diabetes data and provides some powerful data analysis and plotting features.

It is menu and macro driven, thus very convenient to use, optimized for as few keystrokes per action as possible.

LXGLUC.wk1 is useable on every computer running versions 2.4, "portable" or above of Lotus 1-2-3, such as the Hewlett Packard palmtops 95LX, 100LX, 200LX and OG700LX which have Lotus 1-2-3 portable in ROM, or any other MS-DOS or Windows machine. Currently, LXGLUC.wk1 only runs on English versions of Lotus 1-2-3.

I developed LXGLUC.wk1 to have a full-featured and mobile replacement for a commercial Windows software. Of course, LXGLUC.wk1 is not a 1:1 copy of that software, but it supports its most important features, including some complex data analysis, which can lead you to the sources of eventual therapy failures.

LXGLUC.wk1 is entirely independent from the different units for Diabetes data used in the world. It can be configured to use mmol/l instead of the default (mg/dl) with only a few keystrokes using a setup macro. Everything else is unit-independent.

What´s new? (version history):

HISTORY:
~~~~~~~~

v1.0 released 02-05-19:
     First release, some functions not yet implemented,

v1.1 released 02-05-30:
     * Much improved Standard Day graph (now 24 bars, each for one hour
       of the day, instead of 4 ranges, additionally amount of
       measurements (which the value is calculated from) on top of the
       bars!
     * Improved Standard week graph (amount of measurements on top of
       bar)
     * Analysis macro now writes the date of its execution into
       cell Q4 and graphs use that date in the title, so it is now
       obvious how recent the data is from which a graph is created.
     * Basal Rate graph now uses Basal Rate date in title
     * Usage guide (LXGLUC.TXT) partially rewritten. Please read it!
       (Especially advice added how to use data analysis to improve
       the therapy)
     * macro \I added to import old v1.0 data.
     * macro \O added to sort the diary
     * minor macro enhancements

v1.2 released 04-05-22:
     * bugfix: cell AH27 was faulty and caused the 7h-8h glucose
       average not to be calculated correctly.

     WK1 files created with version 1.1 can directly be used with 1.2.


Download:

CLICK HERE

Unzip the downloaded archive file, then unzip the contained file lxgluc.zip into your favorite Lotus spreadsheet working directory and follow the instructions in LXGLUC.TXT.

 

Screenshots:

This is how LXGLUC.wk1 looks on the palmtop Hewlett Packard 200LX:
(note: all data is fictive, there are no real personal values involved)

 


Data entry: Diary

 


Data entry: Long-term data

 


Some data analysis results

 


Graph: glucose.
Interpretation: About every other day there is a way too high blood sugar value. But almost all other values are around 100 mg/dl and thus the blood sugar is relatively good at all. Let´s see if the next graphs show you if there is a tendency when the high values usually occur...

 


Graph: Standard day (glucose average values)
Interpretation: Attention: There are a few low values at night, maybe you should lower the basal rate (see next graph). But on the other hand, you should observe that a bit longer to get reliable results, because these low values were calculated each from only one (1 above the bars) measured value. Also the high value at 16-17 is not very reliable, because it is base on only one measurement. But there seems to be a tendency to high values at 12-13 (the bar is based on 5 measurements, so here has to be taken care, since it seems to be repeating!) and at 22-23. Could this be caused by meals, because maybe you usually take a meal at 12 o´clock and around 9pm? If yes, your bolus to carbohydrate ratio bay be too low. Otherwise, maybe the basal rate has to be increased. In the range around 9-11 you should lower the basal rate, because low blood sugar values seem to occur regulary between 10-12!

 


Graph: Basal rate of insulin pump. Can directly be compared to Standard Day graph in order to adapt the basal rate to the daily course of the blood sugar.
What you can see in combination with the standard day graph: In the range 9-11 the basal rate is already very low, but it should be lowered even more. So, consider setting it to 0.1 at 9-10 and 10-11! And due to the low glucose values early in the morning, maybe the basal rate should also be lowered between 00 and 03 or 04.

 


Graph: Standard week (glucose average values)
Interpretation: Why is the blood sugar so low on Mondays and Wednesdays, compared to all the other days? May be coincidence, because not very much measurements are used to calculate the values (only 4 to 8 measurements), so wait a few weeks and review the graph then to see if there is really a tendency to bad values at specific days!

 


Graph: blood pressure

 


Graph: weight
Interpretation: Seemed to be a good diet between July 01 and May 02!

 


Graph: HbA1, HbA1c
Interpretation: What caused the high motivation to care about the blood sugar before Aug-99? Think about it and try to get a similar motivation again! The recent HbA1(c) value tendency is definitely not what you want! Try to keep the HbA1 below 8% and the HbA1c below 7%!

Using LXGLUC.wk1 with Excel

It is possible to load LXGLUC.wk1 into Excel under Windows. That makes it possible to easily print the graphs or the diary as a list to take them to the doctor.
All the values and formulas will be treated correctly, however, Excel does not make use of the macros and menus of LXGLUC, so operating LXGLUC.wk1 under Excel may be difficult.

 

Do you like to support me?

Dear fellow Palmtopper!

If you like, you may reward me for the work I put into this website with a donation.

 

For a donation in US$:

For a donation in €:

Your donation, even if it's just a single USD, will help me to:

  • finance the server that hosts the site
  • justify time I spend with maintaining the site and do not spend with earning money otherwise (wife is watching! ;D)
  • just continue to be motivated :)

Since my company "hermocom" does not exist for many years anymore, I am now spending my spare time and private money for all of this. Thank you very much! 🙂

Yours truly,
Daniel Hertrich