Serial And Parallel Ports

Serial and Parallel ports provide the connections for many of the devices.  With the advent of Plug-N-Play, most of the technician's job with configuring and using these ports is plugging in a device into the right port.  Unfortunately, there is some crucial information about serial and parallel ports you will need to know.

The Difference Between Serial And Parallel

The first information you need to know is the difference between serial and parallel connections.  The most obvious is the way they communicate.  Serial connections send 1 bit at a time.  Parallel transmits 8 or more at a time.   This makes parallel communications faster in terms of data bandwidth.

So if parallel is faster, why doesn't everything use parallel?  There are two factors.  First, current serial ports provide a stronger signal than parallel ports, making them capable of larger distances.  Secondly, serial ports don't require as intricate of timing mechanisms, meaning they are simpler to connect to.  

Serial Ports

Every motherboard produced today comes with at least a single serial port built in.  Many have two.  This was done because previously you required an I/O board in order to have serial and parallel ports onboard, taking up an expansion slot.  It is also much cheaper to produce a board with serial and parallel ports built in rather than make people buy them separately.  You may see serial ports referred to by other names as well, including RS 232 ports and COM ports.

Serial port data travels over 9 wires inside the cable.  Because only one of these wires is transmitting data, there is less chance of corruption and more signal power in a serial connection.  This makes serial ports capable of up to 50 feet of cable distances, where parallel can only generally maintain 15 feet.

Serial ports are either a DB 9pin or DB 25pin male connector on the back of the computer.  (Male means the side with the pins, female means the side with the holes....  It's a very poor analogy, but it's been with the computer industry forever.)  DB stands for data bus, and DB-type connections come in a D-shape.  (Generally they come in two rows, with one row having one less pin than the other.  The connector is narrowed at each end towards the row with less pins, making the connectors idiot-proof.)

Each serial port is referenced by a COM number.  For example, COM1 is the first COM port, and COM2 is the second.  To make things confusing, computer manufacturers also made a COM3 and COM 4, which are COM1 and COM2 with different I/O addresses.  This was done to allow more serial connections, but comes at a price.  COM1 and COM3 share the same IRQ, as do COM2 and COM4.

To understand why COM1 and COM3 are linked like this, imagine you had a need for 4 serial devices. (Very uncommon these days, but quite common in older computers) In order to connect all four devices, you need 4 COM ports.  But because they share the same IRQ, you can only use either COM1 or COM3 at one time.  If you use both, the system will crash.  This is a fairly rough explanation, but it will get you through the test.

Serial Port Assignments

We reviewed these assignments previously, but to cement them in your head we'll take one more look;

COM # IRQ I/O Address
COM1 4 3F8h
COM2 3 2F8h
COM3 4 3E8h
COM4 3 2E8h

Because these assignments are important for the test, I've tried to come up with a simple method to remembering them.  To remember IRQ's, remember that COM3 uses 4 and COM4 uses 3.  Because COM1 shares the IRQ with COM3, remembering COM3 remembers COM1.  Confused yet?  Just remember that 3 and 4 are reversed.  It will help with the next part too.

Now, COM1 and COM 3 both use odd numbers in the beginning of their I/O address.  Remembering that COM3 used IRQ4, (seemingly idiotic considering COM4 used IRQ3) remember that COM1 uses the HIGHER I/O address than COM3.  So COM3 uses the backwards IRQ with  COM4, and COM1 uses the higher I/O than COM3.  It doesn't get any easier than that.......  unfortunately.  If that doesn't make any sense, just memorize the table.  (It's probably easier in the long run)

There is some terminology;

  • Data Bits - Serial connections use either 7 or 8 bits in their character coding scheme.   

  • Flow Control - This is the method used to control the flow of data over the connection.  For example, it states protocols for stop bits, and for restarting data flow.  (Often called handshaking)

  • RTS/CTS - By sending signals on specific pins, the port and the device communicate when to send data.  RTS is a request to send, send by the device sending the data. CTS is a clear to send, meaning the device is ready for the data.  By coordinating these two signals, the communication is managed.

  • XON/XOFF - A form of flow control using software.  Using control characters, it sends a Start Data (XON) command to send data and a Stop Data (XOFF) to stop the flow.

  • Stop Bits - The signal sent to identify the start and end of a data word.  

  • Parity - In order to provide error detection, a choice is made when the devices start communicating as to how to start parity.  Parity methods vary, and are generally not used anymore.  (A setting of none).  Just remember parity is error detection.

Serial Pin Assignments

All serial connections use 9 wires to communicate.  Because serial connections transfer one bit at a time, the other 8 wires are used for other purposes.  Here are the pinouts.  (You won't need to know which pin does what, but you will need to understand what the pin's signal means)

Pin # Assignment Description
1 Carrier Detect (CD) Lets the computer know a connection has been established.
2 Receive Data (RD) All data is received on this pin.
3 Transmit Data (TD) All data is transmitted on this pin.
4 Data Terminal Ready (DTR) Lets the device know the computer is ready to communicate.
5 Signal Ground A grounding signal (Not commonly used)
6 Data Set Ready (DSR) Lets the computer know the device is ready to communicate.
7 Request to Send (RTS) Lets the computer know the device is ready to send, and vice versa.
8 Clear to Send (CTS) Lets the computer know the device is waiting to receive, and vice versa.
9 Ring Indicator (RI) If the device is hooked up to a phone line, the device sends a signal to the computer letting it know the phone is ringing.

In order for serial communications to work, one side of the communications must be designated the device (Data Communications Equipment, or DCE) and one must be designated the computer (Data Terminal Equipment, or DTE).  If both devices where equal, the pins wouldn't line up and no communications could be established because a single side couldn't control the communications.  This is why you have to use a null modem cable or adapter when connecting together 2 computers over a serial connection.  (A null modem adapter cross-connects pins so that the signals can pass in a DTE-to-DTE fashion.

There is a specific flow to events during a serial connection. Although you probably will never have to repeat it, here is the full process;

The DTE (computer) sends a DTR (Data Terminal Ready) signal

The DCE (device) sends a DSR (Data Set Ready) to acknowledge that it received the DTR and is ready

The DTE (computer) starts sending RTS (Request to Send) signals (Actually one continuous signal)

The DCE (device) sends a CTS (Clear to Send) signal acknowledge the RTS (Again, a continuous signal)

The data flows one bit at a time until either the DCE or DTE turns off it's RTS or CTS signal.  The flow can be turned back on by turning back on the RTS or CTS signal.

UARTs

Universal Asynchronous Receiver/Transmitters (UARTs) are special chips on a motherboard or I/O board that control serial communications.  The UART states the standard pin placement and communication protocol used by the serial device.  It also converts the parallel data stream coming from the computer into a serial bit stream used by the port, converts serial into parallel when data is coming back into the computer.  Essentially, it is the control chip for serial ports

Troubles With Serial Ports

Troubleshooting serial connections is actually quite simple.  There are only 4 steps, check to make sure;

  1. There are no bent pins on the cable ends or one the components.

  2. The cable is not longer than 50 feet.

  3. If you are connecting DTE-to-DTE that you are using a null modem cable or adapter, and if you are connecting DTE-to-DCE that you aren't using a null modem cable or adapter.

  4. Ensure there are no resource conflicts with IRQs and I/O Addresses.  Remember that if you are using COM1 and COM3 that you can only use one device at a time.

Parallel Ports

Parallel ports were originally designed for printers, but have recently become common for connecting external storage devices, scanners, and other devices.  This is due to their high speed.  Remember that all devices are not parallel because there is specifically more timing in sending multiple bits than there are in sending a single bit, meaning they function at a slower MHz rate than serial connections.  They also are limited to 15 feet in cable length, after which the signal degrades too far to be usable.

There are 3 standards used by parallel ports today, and they are covered under the IEEE 1284 standard.  The IEEE 1284 standard is actually called the IEEE Standard Signaling Method for a Bi-directional Parallel Peripheral Interface for Personal Computers, but don't expect a question on that.  The three standards are;

  • SPP (Standard Parallel Port) - Allows single-direction travel of data from the computer to the device.

  • EPP (Enhanced Parallel Port) - Allows bi-directional data transfer, but only one way at a time.  Printers use this to communicate with the computer to tell it such things as paper and ink levels, as well as warn of jams and other printer-side errors.

  • ECP (Enhanced Capabilities Port) - Allows bi-directional data transfer in both directions simultaneously.  (Requires a special ECP cable.)

Troubles With Parallel Ports

The troubleshooting with parallel ports is generally the same as with serial ports.  Ensure there are no broken pins and the cable isn't longer than 15 feet.  Check to make sure you are using an ECP cable for ECP printers, and make sure the proper mode for the port is present in the BIOS.  Printers don't use IRQ's or I/O Addresses, but other external devices may, so check for IRQ conflicts if you're having trouble with an external device.


 

 

Hosted by www.Geocities.ws

1