Sharp logo
Serial Communications 
written by Ed Long / SUC/UK
Source: SUC-magazine March 1993, Volume 13, Number 1, pp. 63 - 64 

Sharp Users Club - Comms Section - Serial Communications

In a recent letter to the Editor, R. Macey asked for information about serial communications. This article stops short of being a tutorial, but I hope it will point users in the right direction.

If you have a PC ( such as the SHARP PC-4501A ), you generally have two ports through which data can be transferred. There is the Centronics or parallel port, normally used for the printer; and the RS-232 or serial port, normally used for communications. The word serial means that data is being transferred one bit after another, down a single wire ( in parallel mode, data is transferred one word at a time, through eight wires in parallel ). You can use a parallel port for communications, but this is not usual.

The big problem with RS-232 is that there never was an adequate specification for it, so different manufacturers did their own thing. To get it to work, you need a correctly-connected cable, and both computers need to have their serial ports set to the same mode. Lets deal with the mode problem first.

If you are using a DOS computer, there is a command called MODE. This command may be used to set an RS-232 port, using syntax along the following lines:-

MODE COM1:96,E,7,1

In the above example, the port is COM1 ( many computers have 2 RS-232 ports ), the transfer rate is 9600 baud ( only the first two figures of the Baud rate are needed ), parity is ‘even‘ ( this is a check made to ensure that a computer ‘word‘ has been correctly transferred ), the number of data bits is 7, and the number of stop bits is 1. Depending on the version of DOS you are using, the parameters may be in a different order, but the MODE command is always along the lines given above, though it may be menu-driven. On CP/M machines the corresponding command is CONFIG.

Any of the parameters may be changed by appropriate use of the MODE ( or CONFIG ) command. You don‘t actually have to worry about these details, except to ensure that both computers have the same setting. To do this on the particular computer or computers that you are using, you have to find a MODE or similar type command, and set all parameters to be the same at both ends of the link ( on many Sharp machines it may also be done from the SETUP menu - MM ). The default setting in DOS 3.3 is COM1:(Baud),E,7,1.

Now comes the cabling. This is the tricky bit, and I must now introduce another concept relating to RS-232 communications. In RS-232, a device can be labeled as either the TRANSMITTER of information ( Data Terminal Equipment, DTE ), or the RECEIVER of information ( Data Communication Equipment, DCE ). In many of the applications for which RS-232 was originally designed, a DTE would be connected to a DCE, resulting in a straightforward set of connections. However, when you are trying to connect one computer to another, this is one DTE talking to another DTE, which gives rise to crossover cable configurations - and much confusion. To simplify matters, the next page shows the connections recommended by Digital Research, in the DR DOS manual, for inter-computer communication. The 25-pin connectors are used on IBM XT machines and the 9-pin connectors are used on IBM AT ( and later ) machines.

25-pin to 25-pin cable
7 ---- 7
2 ---- 3
3 ---- 2
4 ---- 5
5 ---- 4
6 ---- 20
20 ---- 6

9-pin to 25-pin cable
5 ---- 7
3 ---- 2
2 ---- 3
7 ---- 5
8 ---- 4
6 ---- 20
4 ---- 6

9-pin to 9-pin cable
5 ---- 5
3 ---- 2
2 ---- 3
7 ---- 8
8 ---- 7
6 ---- 4
4 ---- 6


There is nothing mysterious about RS-232, but there is a lot of confusion and non-standardness. In short, all you need is the correct cable, and the same mode settings at each end.

References: Horowitz and Hill, The Art of Electronics, pp. 723 - 725.

Go to the top of this page      Get next page - part II      Home     

last updated October 17, 2003
SUC / UK: Ed Long

khmweb barrierefreies webdesign Berchtesgaden