![]() 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 |
||||||||||||||||||||||||
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 dont 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.
|
||||||||||||||||||||||||
Conclusion |
||||||||||||||||||||||||
References: Horowitz and Hill, The Art of Electronics, pp. 723 - 725. |