how to work serial parralel ports

Upload: prashuprit

Post on 30-May-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 How to Work Serial Parralel Ports

    1/6

    How Serial Ports WorkConsidered to be one of the most basic external connections to a computer, the serial port has been anintegral part of most computers for more than 20 years. Although many of the newer systems have

    done away with the serial port completely in favor ofUSB connections, mostmodemsstill use the

    serial port, as do some printers, PDAs and digital cameras. Few computers have more than two serial

    ports.

    Two serial ports on the back of a PC

    Essentially, serial ports provide a standard connector and protocol to let you attach devices, such as

    modems, to your computer. In this edition ofHow Stuff Works, you will learn about the differencebetween a parallel port and a serial port, what each pin does and what flow control is.

    UART NeededAll computer operating systems in use today support serial ports, because serialports have been around for decades. Parallel ports are a more recent inventionand are much faster than serial ports. USB ports are only a few years old, and willlikely replace both serial and parallel ports completely over the next severalyears.

    The name "serial" comes from the fact that a serial port "serializes" data. That is, it takes abyte of dataand transmits the 8 bits in the byte one at a time. The advantage is that a serial port needs only one wire

    to transmit the 8 bits (while a parallel port needs 8). The disadvantage is that it takes 8 times longer to

    transmit the data than it would if there were 8 wires. Serial ports lower cable costs and make cablessmaller.

    Before each byte of data, a serial port sends a start bit, which is a single bit with a value of 0. After

    each byte of data, it sends a stop bit to signal that the byte is complete. It may also send a parity bit.

    Serial ports, also called communication (COM) ports, are bi-directional. Bi-directional

    communication allows each device to receive data as well as transmit it. Serial devices use different

    pins to receive and transmit data -- using the same pins would limit communication to half-duplex,meaning that information could only travel in one direction at a time. Using different pins allows for

    full-duplex communication, in which information can travel in both directions at once.

    http://computer.howstuffworks.com/usb.htmhttp://computer.howstuffworks.com/usb.htmhttp://computer.howstuffworks.com/modem.htmhttp://computer.howstuffworks.com/modem.htmhttp://computer.howstuffworks.com/modem.htmhttp://computer.howstuffworks.com/pda.htmhttp://computer.howstuffworks.com/digital-camera.htmhttp://computer.howstuffworks.com/index.htmhttp://www.howstuffworks.com/operating-system.htmhttp://www.howstuffworks.com/parallel-port.htmhttp://www.howstuffworks.com/usb.htmhttp://www.howstuffworks.com/bytes.htmhttp://www.howstuffworks.com/bytes.htmhttp://computer.howstuffworks.com/modem.htmhttp://computer.howstuffworks.com/pda.htmhttp://computer.howstuffworks.com/digital-camera.htmhttp://computer.howstuffworks.com/index.htmhttp://www.howstuffworks.com/operating-system.htmhttp://www.howstuffworks.com/parallel-port.htmhttp://www.howstuffworks.com/usb.htmhttp://www.howstuffworks.com/bytes.htmhttp://computer.howstuffworks.com/usb.htm
  • 8/9/2019 How to Work Serial Parralel Ports

    2/6

    This 40-pin Dual Inline Package (DIP) chip is avariation of the National Semiconductor NS16550D

    UART chip.

    Serial ports rely on a special controller chip, the Universal Asynchronous Receiver/Transmitter(UART), to function properly. The UART chip takes the parallel output of the computer's system bus

    and transforms it into serial form for transmission through the serial port. In order to function faster,most UART chips have a built-inbufferof anywhere from 16 to 64 kilobytes. This buffer allows the

    chip to cache data coming in from the system bus while it is processing data going out to the serial port.

    While most standard serial ports have a maximum transfer rate of 115 Kbps (kilobits per second), highspeed serial ports, such as Enhanced Serial Port (ESP) and Super Enhanced Serial Port (Super

    ESP), can reach data transfer rates of 460 Kbps.

    The Serial ConnectionThe external connector for a serial port can be either 9 pins or 25 pins. Originally, the primary use of aserial port was to connect a modem to your computer. The pin assignments reflect that. Let's take a

    closer look at what happens at each pin when a modem is connected.

    Close-up of 9-pin and 25-pin serial connectors

    http://www.howstuffworks.com/computer-memory.htmhttp://www.howstuffworks.com/computer-memory.htmhttp://www.howstuffworks.com/cache.htmhttp://www.howstuffworks.com/computer-memory.htmhttp://www.howstuffworks.com/cache.htm
  • 8/9/2019 How to Work Serial Parralel Ports

    3/6

    9-pin connector:

    1. Carrier Detect - Determines if the modem is connected to a working phone line.

    2. Receive Data - Computer receives information sent from the modem.

    3. Transmit Data - Computer sends information to the modem.

    4. Data Terminal Ready - Computer tells the modem that it is ready to talk.

    5. Signal Ground - Pin is grounded.

    6. Data Set Ready - Modem tells the computer that it is ready to talk.

    7. Request To Send - Computer asks the modem if it can send information.

    8. Clear To Send - Modem tells the computer that it can send information.

    9. Ring Indicator - Once a call has been placed, computer acknowledges signal (sent from

    modem) that a ring is detected.

    25-pin connector:

    1. Not Used

    2. Transmit Data - Computer sends information to the modem.3. Receive Data - Computer receives information sent from the modem.

    4. Request To Send - Computer asks the modem if it can send information.

    5. Clear To Send - Modem tells the computer that it can send information.

    6. Data Set Ready - Modem tells the computer that it is ready to talk.

    7. Signal Ground - Pin is grounded.

    8. Received Line Signal Detector - Determines if the modem is connected to a working

    phone line.

    9. Not Used: Transmit Current Loop Return (+)

    10. Not Used

    11. Not Used: Transmit Current Loop Data (-)

    12. Not Used

    13. Not Used

    14. Not Used

    15. Not Used

    16. Not Used

    17. Not Used

    18. Not Used: Receive Current Loop Data (+)

    19. Not Used

    20. Data Terminal Ready - Computer tells the modem that it is ready to talk.

    21. Not Used

    22. Ring Indicator - Once a call has been placed, computer acknowledges signal

    (sent from modem) that a ring is detected.

    23. Not Used

  • 8/9/2019 How to Work Serial Parralel Ports

    4/6

    24. Not Used

    25. Not Used: Receive Current Loop Return (-)

    Voltage sent over the pins can be in one of two states, On orOff. On (binary value "1") means that thepin is transmitting a signal between -3 and -25 volts, while Off (binary value "0") means that it is

    transmitting a signal between +3 and +25 volts...

    How Parallel Ports WorkIf you have a printer connected to your computer, there is a good chance that it uses the parallel port.While USB is becoming increasingly popular, the parallel port is still a commonly used interface for

    printers.

    A typical parallel port on the back of your computer

    Parallel ports can be used to connect a host of popular computer peripherals:

    Printers

    Scanners

    CD burners

    External hard drives

    Iomega Zip removable drives

    Network adapters

    Tape backup drives

    Parallel Port BasicsParallel ports were originally developed by IBM as a way to connect a printer to

    your PC. When IBM was in the process of designing the PC, the company wantedthe computer to work with printers offered by Centronics, a top printermanufacturer at the time. IBM decided not to use the same port interface on thecomputer that Centronics used on the printer.

    http://www.howstuffworks.com/usb.htmhttp://www.howstuffworks.com/inkjet-printer.htmhttp://www.howstuffworks.com/scanner.htmhttp://www.howstuffworks.com/cd-burner.htmhttp://www.howstuffworks.com/hard-disk.htmhttp://www.howstuffworks.com/removable-storage.htmhttp://www.howstuffworks.com/home-network.htmhttp://www.howstuffworks.com/framed.htm?parent=parallel-port.htm&url=http://www.ibm.comhttp://www.howstuffworks.com/pc.htmhttp://www.howstuffworks.com/usb.htmhttp://www.howstuffworks.com/inkjet-printer.htmhttp://www.howstuffworks.com/scanner.htmhttp://www.howstuffworks.com/cd-burner.htmhttp://www.howstuffworks.com/hard-disk.htmhttp://www.howstuffworks.com/removable-storage.htmhttp://www.howstuffworks.com/home-network.htmhttp://www.howstuffworks.com/framed.htm?parent=parallel-port.htm&url=http://www.ibm.comhttp://www.howstuffworks.com/pc.htm
  • 8/9/2019 How to Work Serial Parralel Ports

    5/6

    Instead, IBM engineers coupled a 25-pin connector, DB-25, with a 36-pin Centronics connector to

    create a special cable to connect the printer to the computer. Other printer manufacturers ended up

    adopting the Centronics interface, making this strange hybrid cable an unlikely de facto standard.

    When a PC sends data to a printer or other device using a parallel port, it sends 8bits of data (1 byte) at

    a time. These 8 bits are transmitted parallel to each other, as opposed to the same eight bits being

    transmitted serially (all in a single row) through a serial port. The standard parallel port is capable of

    sending 50 to 100 kilobytes of data per second.Let's take a closer look at what each pin does when used with a printer:

    Pin 1 carries the strobe signal. It maintains a level of between 2.8 and5 volts, but drops below 0.5 volts whenever the computer sends a byte ofdata. This drop in voltage tells the printer that data is being sent.

    Pins 2 through 9 are used to carry data. To indicate that a bit has avalue of 1, a charge of 5 volts is sent through the correct pin. No charge ona pin indicates a value of 0. This is a simple but highly effective way totransmit digital information over an analog cable in real-time.

    Pin 10 sends the acknowledge signal from the printer to thecomputer. Like Pin 1, it maintains a charge and drops the voltage below 0.5volts to let the computer know that the data was received.

    If the printer is busy, it will charge Pin 11. Then, it will drop the voltagebelow 0.5 volts to let the computer know it is ready to receive more data.

    The printer lets the computer know if it is out of paper by sending acharge on Pin 12.

    As long as the computer is receiving a charge on Pin 13, it knows thatthe device is online.

    The computer sends an auto feed signal to the printer through Pin 14using a 5-volt charge.

    If the printer has any problems, it drops the voltage to less than 0.5volts on Pin 15 to let the computer know that there is an error.

    Whenever a new print job is ready, the computer drops the charge onPin 16 to initialize the printer.

    Pin 17 is used by the computer to remotely take the printer offline.This is accomplished by sending a charge to the printer and maintaining itas long as you want the printer offline.

    Pins 18-25 are grounds and are used as a reference signal for the low(below 0.5 volts) charge.

    http://www.howstuffworks.com/bytes.htmhttp://www.howstuffworks.com/bytes.htmhttp://www.howstuffworks.com/serial-port.htmhttp://www.howstuffworks.com/question501.htmhttp://www.howstuffworks.com/bytes.htmhttp://www.howstuffworks.com/serial-port.htmhttp://www.howstuffworks.com/question501.htm
  • 8/9/2019 How to Work Serial Parralel Ports

    6/6

    Notice how the first 25 pins on the Centronics end match up with the pins of the first connector. With

    each byte the parallel port sends out, a handshaking signal is also sent so that the printer canlatch the

    byte.

    http://www.howstuffworks.com/boolean3.htmhttp://www.howstuffworks.com/boolean3.htmhttp://www.howstuffworks.com/boolean3.htm