SHARP to RS232 Serial Converter

Version 1.2 - March 30, 1993.
updates last added - September 28, 1995.
Minor updates added - April 2001.

By Andrew Woods http://www.AndrewWoods3D.com

This document details how to build your own SHARP palm-top/hand-held to RS232 serial converter. In summary, this device allows the SHARP range of hand-held computers and pocket organisers to be interfaced to (almost) any computer which has an RS232 serial port i.e. IBM-PCs (or compatibles), Amigas, SUNs, other UNIX machines, etc. The converter works by converting the +/-12V RS232 levels (found on IBM-PCs, etc.) to the +5V/0V levels (RS232C) found on the SHARPs and vice versa. For simplicity I will only refer to IBM-PCs in the rest of this article.

The converter will work with a large range of SHARP pocket computers and SHARP Wizard pocket organisers, or more generally any SHARP computer with the 15 pin serial port. A brief list of the computers that I and others have tried the interface with include the PC-E500, PC-1350, PC-1460 & OZ/IQ-7200/8000.

This circuit has been checked, constructed and confirmed to work. The fact still remains however that you may make mistakes in the construction of the converter and subsequent damage can result to your computer(s). Check everything you do very carefully, computers are very sensitive devices (sometimes more than your girlfriend/boyfriend/husband/wife/etc). If you are not familiar with electronics, get some help from a friend who is. Don't be scared - just careful.

The Sharp PC-E500 was used in a research project (The development of a stereoscopic video system) conducted by me in 1990-1992.

HARDWARE:

Firstly I have shown simply the circuit diagram which serves to explain the logic. Please excuse the messy diagrams but it is the best I can manage with ASCII.

SHARP
15-pin
Serial Port
----+                                IBM-PC
    |                                25-pin
CD  |                                serial
 8<-+----+                            port
    |    |                           |\      9-pin
Vcc |    |                  MAX232   | \     serial
 10-+----+        4069    or MAX233  |  \     port
    |                                |   \   |\
Tx  |             |\         |\      | Rx |  | \
 2--+-------------| O--------| O-----+-3  |  |  \
    |             |/         |/      |    |  | Rx|
    |                                |    |  | 2 |
Rx  |              /|         /|     | Tx |  |   |
 3--+-------------O |--------O |-----+-2  |  | Tx|
    |              \|         \|     |    |  | 3 |
SIGNAL                               |    |  |GND|
GND |                                | GND|  | 5 |
 7--+--------------------------------+-7  |  |   |
    |                                |    |  |   |
RR  |             |\         |\      | CTS|  |CTS|
 11-+-------------| O--------| O-----+-5  |  | 8 |
    |             |/         |/      |    |  |   |
    |                                |    |  |   |
CTS |              /|         /|     | DTR|  |DTR|
 5--+-------------O |--------O |-----+-20 |  | 4/
    |              \|         \|     |    |  | /
    |                                |    |  |/
    |                                |   /
    |                                |  /
    |                                | /
    |                                |/
----
      Figure 1 - Converter circuit diagram
The transmit and receive lines go through a series of inverters. The main ones of interest are on the right (MAX232 or MAX233) which convert the TTL logic signals (+5V/0V) to +/-12V levels (actually with these chips it is closer to +/- 10 Volts). The inverter gates on the left (4069) are simply to re-invert the signal because the MAX chip inverted the signals in the voltage level conversion process.

Signal ground pins are connected together. Some of the handshaking lines have also been connected through the MAX chip and 4069 inverters (RR on the SHARP to CTS on the IBM-PC & CTS on the SHARP to DTR on the IBM-PC). The remaining input handshaking line on the SHARP (Carrier Detect) has been wired to Vcc to disable that handshaking function.

The circuit in figure 1 can be implemented with either the MAX233 chip (figure 2) or the MAX232 chip (figure 3). Both chips serve the same purpose however the MAX233 has internal capacitors for the charge pump section (i.e. deriving +/- 10V supplies from a single 5V supply) whereas the MAX232 must be wired up with external capacitors. Both chips are from Maxim. Some equivalents for the MAX232 are the DS1228 from Dallas Semiconductor and the AD232 from Analog Devices. Use whichever chip takes your fancy, depending upon product availability and how much money you want to spend (the MAX233 is more expensive). The 78L05 is a 3 pin 5V voltage regulator (maximum output current 100mA). A 7805 could alternatively be used (maximum output current 1A). The whole circuit is supplied by a 9 Volt battery. You can alternatively use a five volt plug pack to supply the device if you so wish. The 0.1uF capacitors are to reduce noise on the supply lines. The 4069 is powered from the SHARP to protect the inputs of the SHARP.

                                                   78L05
                                                 ---------         9V
                                                |         |      Battery
                                    +--------+--|Vout  Vin|--+------+
                                    |        |  |   GND   |  |      |
                                   7|Vcc    ===  ---------   |    -----
                                  ----\/---  |0.1uF  |      ===    ---
SHARP                          12| MAX233  | |Cap.   |       |      |
15-pin                        +--|         | +-------+-------+------+
Serial Port                   |  |         |               0.1uF    |
                              |17|         |             Capacitor  |
----                          +--|         |11                      |
    |                            |         |--+                     |
    |      +----------+          |         |  |     IBM-PC          |
    |      |          |        10|         |15|     25-pin          |
CD  |      |          |       +--|         |--+     serial          |
 8<-+----+ |        14|Vcc    |  |         |         port   9-pin   |
    |    | |   ---\/----      |16|         |         |\     serial  |
Vcc |    | |  |         |     +--|         |         | \     port   |
 10-+----+-+  |  4069   |        |         |         |  \   |\      |
    |         |         |        |         |         |   \  | \     |
Tx  |        3|   |\    |4      2|   |\    |5        | Rx | |  \    |
 2>-+---------|---| O---|--------|---| O---|---------+>3  | | Rx|   |
    |         |   |/    |        |   |/    |         |    | | 2 |   |
    |         |         |        |         |         |    | |   |   |
Rx  |        2|    /|   |1     20|    /|   |19       | Tx | | Tx|   |
 3<-+---------|---O |---|--------|---O |---|---------+<2  | | 3 |   |
    |         |    \|   |        |    \|   |         |    | |   |   |
    |         |         |        |         |         |    | |   |   |
RR  |       13|   |\    |12     1|   |\    |18       | CTS| |CTS|   |
 11>+---------|---| O---|--------|---| O---|---------+>5  | | 8 |   |
    |         |   |/    |        |   |/    |         |    | |   |   |
    |         |         |        |         |         |    | |   |   |
CTS |        8|    /|   |9      3|    /|   |4        | DTR| |DTR|   |
 5<-+---------|---O |---|--------|---O |---|---------+<20 | | 4 |   |
    |         |    \|   |        |    \|   |         |    | |   |   |
    |         |         |        |         |         |    | |GND|   |
SIGNAL         ---------          ---------          |    | | 5/    |
GND |             7|GND           6| GND |9          | GND| | /     |
 7--+--------------+---------------+-----+---+-------+-7  | |/      |
    |                                        |       |    |         |
    |                                        |       |   /          |
    |                                        |       |  /           |
    |                                        |       | /            |
    |                                        |       |/             |
----                                         |                      |
                                             |                      |
                                             +----------------------+
Figure 2 - Circuit implemented with MAX233


                                                        78L05
                                             10uF     --------     9V
                                             25V     |        |  Battery
                            +-------+----------+---+-|Vout Vin|-+---+
                            |       |         +|   | |   GND  | |   |
                       10uF |     16|Vcc      === === --------  | -----
                        25V===    ----\/---    |   |0.1uF |    === ---
SHARP                      +|   2| MAX232  |   |   |Cap.  |     |   |
15-pin                      +----|         |   +---+------+-----+---+
Serial Port                     1|         |  +|              0.1uF |
                            +----|         |  ===10uF      Capacitor|
----                        |    |         |6  | 25V                |
    |                  10uF+|    |         |---+                    |
    |      +----------+ 25V===   |         |5        IBM-PC         |
    |      |          |     |    |         |----+    25-pin         |
CD  |      |          |     |   3|         |10uF|    serial         |
 8<-+----+ |        14|Vcc  +----|         | 25V|     port  9-pin   |
    |    | |   ---\/----         |         |   ===   |\     serial  |
Vcc |    | |  |         |        |         |   +|    | \     port   |
 10-+----+-+  |  4069   |        |         |4   |    |  \   |\      |
    |         |         |        |         |----+    |   \  | \     |
Tx  |        3|   |\    |4     10|   |\    |7        | Rx | |  \    |
 2>-+---------|---| O---|--------|---| O---|---------+>3  | | Rx|   |
    |         |   |/    |        |   |/    |         |    | | 2 |   |
    |         |         |        |         |         |    | |   |   |
Rx  |        2|    /|   |1      9|    /|   |8        | Tx | | Tx|   |
 3<-+---------|---O |---|--------|---O |---|---------+<2  | | 3 |   |
    |         |    \|   |        |    \|   |         |    | |   |   |
    |         |         |        |         |         |    | |   |   |
RR  |       13|   |\    |12    11|   |\    |14       | CTS| |CTS|   |
11>-+---------|---| O---|--------|---| O---|---------+>5  | | 8 |   |
    |         |   |/    |        |   |/    |         |    | |   |   |
    |         |         |        |         |         |    | |   |   |
CTS |        8|    /|   |9     12|    /|   |13       | DTR| |DTR|   |
 5<-+---------|---O |---|--------|---O |---|---------+<20 | | 4 |   |
    |         |    \|   |        |    \|   |         |    | |   |   |
    |         |         |        |         |         |    | |GND|   |
SIG.|          ---------          ---------          |    | | 5/    |
GND |             7|GND          15|GND              | GND| | /     |
 7--+--------------+---------------+---------+-------+-7  | |/      |
    |                                        |       |    |         |
    |                                        |       |   /          |
    |                                        |       |  /           |
    |                                        |       | /            |
    |                                        |       |/             |
----                                         |                      |
                                             |                      |
                                             +----------------------+
Figure 3 - Circuit implemented with MAX232
The only major difference in the MAX232 circuit are the five 10uF capacitors. I used tantalums (mainly because of their small size) with a voltage rating of 25V. You could use tantalum or electrolytic capacitors. The voltage rating can be of anything over 10V. The capacitors are polarised so be careful of the direction you wire them in. The polarities may look strange but this is because plus and minus voltages are being generated in the charge pump section.

In order to explain the capacitor polarities, here are the pin allocations of the MAX232:

--------------------------------------------------
|pin| name             function                  |
|---|--------------------------------------------|
| 1 | c1+      \                                 |
| 3 | c1-       >  +5v to +10v voltage doubler   |
| 2 | V+ (10V) /                                 |
| 4 | c2+      \                                 |
| 5 | c2-       >  +10V to -10V voltage inverter |
| 6 | V- (-10V)/                                 |
|15 | GND                                        |
|16 | VCC (5V)                                   |
|11 | T1in  \                                    |
|14 | T1out  \  TTL/CMOS inputs to               |
|10 | T2in   /   RS-232 outputs                  |
| 7 | T2out /                                    |
|12 | R1out \                                    |
|13 | R1in   \  RS-232 inputs to                 |
| 9 | R2out  /  TTL/CMOS outputs                 |
| 8 | R2in  /                                    |
--------------------------------------------------
The whole circuit can be wired up on a piece of veroboard and placed in a small box or else you could make up a small printed circuit board from the design included later.

Unfortunately the 15 pin serial port connector is a special connector. You can construct your own with VERY carefully placed wires and araldite glue or else a SHARP dealer MAY be able to get one for you - but the word in the USA is that SHARP spare parts won't know what you are talking about if you ask them. I bought my connector (with matching backshells) from:

Portacom
1297 Hay Street,
West Perth, WA, 6005
AUSTRALIA
Phone: +61 8 9481 1565
Fax: +61 8 9324 1259

[NOTE: As of June 1994 the connector was no longer available from Portacom]

The connector is also apparently available from the following source:

Yellow Computing,
Hanns-Martin-Schleyer-Strasse 1,
D-74177 Bad Friedrichshall
GERMANY.
Phone: +49 7136 9511 0
Fax: +49 7136 9511 11
WWW: http://www.yellow.de
As of Dec 2000, Larry Berg of Purple Computing advised that he has some 15 pin connectors and possibly fully built up converters:

Larry Berg,
Purple Computing,
2048 Southside Road, Box 100,
Murphy, OR 97533,
USA.
Phone: +1 541 479 8087 Fax: 8089
Web: http://pfranc.com

[The details of these companies are provided for information purposes only. I have no affiliation with these companies. ]

The correct orientation of the 15 pin connector may change from computer to computer, however, generally pin 1 can be found as follows: sit the computer on a surface in its normal operating position i.e. keyboard facing up and screen open (if applicable). Looking into the 15 pin connector with the computer still sitting on the desk (but not with your head upside down), pin 1 should be on the right and pin 15 on the left. You should check whether this is the correct orientation by checking for the supply voltage (~6V) between ground on pin 7 and the supply on pin 10 with a multimeter.

For those who are interested in further information on the function of the 15 pin connector, here is what my PC-E500 manual says plus a few additions:

-------------------------------------------------------------------------
|Pin|Name           |Symbol| I/O  | Function                            |
|---|---------------|------|------|-------------------------------------|
|1  |Frame Ground   | FG   | -    | Protective Chassis ground           |
|2  |Send Data      | SD   | Out  | Outputs a DC data signal            |
|   |               |      |      | (transmit data from SHARP to IBM-PC)|
|3  |Receive Data   | RD   | In   | Inputs a DC data signal             |
|   |               |      |      | (received data to SHARP from IBM-PC)|
|4  |Request to Send| RS   | Out  | HIGH: Sends carrier                 |
|   |               |      |      | (this line turns to high level when |
|   |               |      |      |  the SHARP is ready to send data)   |
|5  |Clear to Send  | CS   | In   | HIGH: Transmission Enabled          |
|   |               |      |      | (while this line is held high, the  |
|   |               |      |      |  SHARP can send data)               |
|7  |Signal Ground  | SG   | -    | Reference 0 voltage for all signals |
|8  |Data Carrier   | CD   | In   | HIGH: Carrier signal received.      |
|   | Detect        |      |      | (while this line is high, the SHARP |
|   |               |      |      |  can receive data)                  |
|10 |Power Supply   | VC   | -    | Power Supply(~6V)                   |
|11 |Receive Ready  | RR   | Out  | HIGH: Receive Ready                 |
|   |               |      |      | (When the SHARP can receive data,   |
|   |               |      |      |  this line turns to a high level)   |
|13 |Power Supply   | VC   | -    | Power Supply(~6V)                   |
|14 |Data Terminal  | ER   | Out  | HIGH: Local Terminal Ready          |
|   | Ready         |      |      | (While the SHARP's serial circuit is|
|   |               |      |      |  open, this line is high)           |
-------------------------------------------------------------------------
 Note: 1. HIGH: VC voltage level, LOW: SG voltage level
       2. The computer uses CMOS components.  Application of voltages
          exceeding the allowable range, i.e., voltage level between SG
          and VC, may damage the computer.

THE PRINTED CIRCUIT BOARD:

I finally got around to designing a PCB for this circuit. The PCB allows all the circuitry (including the two ICs and capacitors) to fit snugly into the backshell which also houses the connector. It is a tight fit, but the backshell sold by Portacom is large enough to house all the components - I don't know what the german backshell is like. The result is a very neat and professional looking link which fits very snugly into my briefcase (along with my SHARP PC-E500 and SHARP 386SX notebook).

The circuit was designed with an Australian PCB and Schematic design package called PROTEL (DOS version now shareware http://www.protel.com.au). The Schematic, PCB and PCB checkplot files are stored as pdf documents in the zip archive - use Adobe Acrobat to view and print the files. The files are named as follows:

        --- contents of PCLNKPCB.ZIP ---
Schematic                            PCLINK-S.pdf
PCB                                  PCLINK-P.pdf
PCB double size checkplot            PCLINK-C.pdf
The files are stored in a PKZIP archive "PCLNKPCB.ZIP"

The PCB is single sided and only requires two links, between the three points labelled 5V. Solder a 9V battery snap to the points labelled +6-9V and GND. A multi-core cable can then be soldered to points labelled Rx, Tx, C (CTS), D (DTR) and GND and wired to a 25 or 9 pin D connector. Tantalum capacitors should be used because of their size.

SOFTWARE:

(A) SHARP HANDHELD COMPUTERS PC-E500, E550/1450, 1460, 1480/1350, 1360 and WIZARDs (Electronic Organisers) with BASIC card ** IN BASIC MODE **.

On the IBM-PC you need a terminal emulation program to read and write the serial port. TELIX, KERMIT and PC-TALK are shareware examples. I have found TELIX to be the most versatile.

On the SHARP no software is required. Firstly configure the RS-232 transmission parameters with:

OPEN"9600,N,8,1,A,L,&H1A,N,N" This command may vary between computers. This particular command is for the PC-E500. Check your manual for the final word.

The parameters inside the quotes are:

 9600  - baud (alternatives: 300,600,1200,2400,4800,9600)
 N     - No parity (N,E,O)
 8     - 8 bits per character (7,8)
 1     - 1 stop bit (1,2)
 A     - Ascii (the only setting)
 L     - end of line is CR + LF
         ('C' for CR only, 'F' for LF only, 'L' for CR+LF)
 &H1A  - end of file code (any number: &H00-&HFF)
 N     - Not using XON/XOFF (N,X)
 N     - No switch to SI&SO (N,S)
The IBM-PC terminal program needs to be set up with similar parameters. This is up to you. Refer to the manual of the terminal program you are using.

On the SHARP type:

CLOSE     (Close the link just opened.  It was only opened to define the
          communication parameters.)

  SAVE    (send a BASIC file to serial port.)
or
  LOAD    (receive a BASIC file from the serial port.)
The only disadvantage with this form of communication is that you cannot transfer machine code programs easily (more later).

The only thing I need to add is with regard to handshaking. Since the SHARPs are fairly slow machines it is necessary to send data rather carefully to the SHARP so that it does not lose any characters. This can be done either by handshaking (monitoring the RR line from the SHARP) or by adding pauses in serial transmission. The RR line on the SHARP tells the IBM-PC that the SHARP is ready to receive data. This is the most efficient method and requires you to enable harwired/hardware handshaking on your terminal program. In TELIX this is on the Options->Terminal_Options menu under "CTS/RTS handshaking". Check the manual for your terminal program on how to enable harwired handshaking.

The adding of pauses during serial transmission is done by adding a pause after each carriage return is sent to the sharp. This pause is required because the SHARP processes each line when a carriage return is received - while it is processing the received data, it does not monitor the serial port and data can be lost. The pause will hopefully ensure no data is sent while the SHARP is 'thinking'. Both 'TELIX' and 'PC-TALK' have a function which will pause for a certain period of time every time a carriage return is sent. For the transmission of BASIC files, I have found a pause of about 0.2 seconds works well, however if hex data is being transferred, it may need about 0.5 seconds. It all depends upon how slow your SHARP is processing the data. If you don't program a pause the SHARP will start losing data and will stop with I/O errors.

The hardware handshaking is the most efficient and ensures the data is sent at the maximum possible rate.

Machine code programs (binary files) need to be converted to ASCII before transmission. A UUENCODE/UUDECODE program has been written by Eiji Kako from Japan for the SHARP PC-E500. Email me if you would like a copy of the program. Source code is also available.

(B) SHARP WIZARDS (POCKET ORGANISERS) IQ/OZ/ZQ-5/6/7/8x00

Because the data from the WIZARD is more application specific with diaries, data bases, etc several individuals and companies have written programs (to be run on the big computer, not the SHARP) to receive, transmit, process, collate, etc the various data types.

The anonymous FTP site ftp://math.berkeley.edu/pub/Software/Wizard has a large selection of wizard software. The site includes source code in C, stand-alone programs for Microsoft Windows and UNIX. The site contains lots of other goodies too.

NB: Sometime in 2000 the math.berkeley.edu site went dead. I have made a local copy of some of the files here. Please note that I am unable to provide any support for these files.

On the WIZARD all that is required is to switch it to PC-LINK mode and execute the program on the big computer.

This is about the limit of my experience with WIZARDS so I will limit my advice at this point and let you source the appropriate programs if you are interested.

Changes from Version 1.1 - Jan 25, 1992:

Conclusion:

Several people have asked me whether this converter will allow them to connect the SHARP to a modem. The short answer is no. Modems usually require the use of all of the handshaking lines (the circuit as shown above only level converts two) and the pin connections are different to connect up to a modem (because you are plugging the SHARP into a DCE (Data Communication Equipment) rather than another DTE (Data Terminating Equipment)). If the SHARP was to be connected to a modem, the connections would be something like:

                    SHARP    MODEM
                   (15 pin) (25 pin)
Transmitted Data      2        2
Received Data         3        3
Request to Send       4        4
Clear to Send         5        5
Data Set Ready       N/A       6
Data Carrier Detect   8        8
Receive Ready        11       11
Data Terminal Ready  14       20
Ring Indicator       N/A      22
Signal Ground         7        7
This is straight from my data sheets on the SHARP and RS232 and I have not tested it - so it could be wrong. Remember that the signal from the SHARP needs to be level converted to the MODEM connector (i.e. use a MAX232 or equivalent plus a TTL/CMOS inverter)

This version of the converter is not compatible with the Macintosh. The Macintosh does however have a serial port with similar signals to the IBM-PC port so I suspect all that is required is a change in the connector and also a choice of suitable software and/or compilation of the C source code on a Mac compiler.

Most important of all, Good luck!


Last Updated: 30th August, 1995
Maintained by: Andrew Woods