KarbosGuide.com. Module 5a1b.

About I/O units, continued

The contents:

  • The Internal I/O ports and units
  • The serial ports

  • Next page
  • Previous page

  • The internal I/O ports

    As mentioned, the USB is going to become the main bus for low speed devices. But so far we still use the internal "face" of the ISA bus for a range of purposes. At any PC motherboard you find these:

  • The floppy controller
  • The serial ports
  • The parallel port(s)
  • The keyboard controller

    They all occupy IRQs which is a central part of ISA architecture and a pain in the a... Let us take a moment to look at these ports and controllers.

    The serial ports

    Serial transmission means to send data from one unit to another one bit at the time. The PC architecture traditionally holds two RS232 serial ports. The RS-232 standard describes an asynchronous interface. This means that data are transmitted only when the receiving unit is ready to receive them:

    Thanks to Elmue for the clarification


    In the synchronous transmission you need two seperate cables. With every clock pulse (i.e. the positive going edge of the clock) one data bit is transferred.

    In the asynchronous transmission clock and data are transferred with only one cable.

    The clock has to be reconstructed from the mixed signal in the receiver: After a "1" start bit come 8 data bits and then a "0" stop bit (or two "0" stop bits) and so on.

    The UART chip

    The serial ports are controlled by an UART chip (Universal Asynchronous Receiver Transmitter) like 16550 AFN. This chip receives bytes from the system bus and chops them up into bits. The most common package is called 8/N/1 meaning that we send 8 bits, no parity bit and finally one stop bit. This way one byte occupies 9 bits:

    The serial transfer is limited to a speed of 115,200 bits per second. The cable can be up to 200 meter long. The serial ports can be used to connect:

  • The mouse and digitizers
  • Modems
  • ISDN adapters
  • Printers with serial interface
  • Digital cameras
  • ....

    These units are connected to the serial ports using either DB9 or DB25 plugs.

    In modern PCs most of these devices connect to the USB bus instead. This gives a much higher transfer speed.

    The parallel port

    Parallel transmission means that data are conducted through 8 separate wires - transmitting a full byte in one operation. This way the parallel transmission is speedier than the serial, but the cabling is limited to 5-10 meters. The cable is fat and unhandy, holding up to 25 wires and the transmission is controlled according to the Centronics standard.

    Most printer manufactures use a 36-pins Amphenol plug, where the PC's parallel port holds a 25-pinned connector. Hence the special printer cable. To the left you see the 25 pin connector, to the right the 36-pin:

    Then parallel port represents the most uncomplicated interface of the PC. It is always used to connect the printer, but with the bi-directional parallel port (EPP/ECP), other devices have found their way to this interface. Today you find:

  • ZIP drives
  • Portable CD-ROM drives
  • SCSI adapters
  • Digital cameras
  • Scanners all using the parallel port to connect to the system bus.

    The EPP/ECP ports

    Today we operate with Enhanced Parallel Port/Enhanced Capability Ports. This method for bi-directional (half duplex) parallel communication offers higher rates of data transfer (up to 1 megabyte per second) than the original parallel signaling method. EPP is used for non-printer peripherals, where ECP is for printers and scanners. You find the settings for the printer port in the setup program on the motherboard.

    Both port types are parts of the IEEE1284 standard, which also includes Centronics.

    To get the best results all the involved hardware and the operating system has to be EPP/ECP compatible. Windows supports IEEE1284 in its parallel plug-and-play feature. It also supports ECP if you have a printer and a parallel port with ECP. The printer cable has to be complete with all 25 wires connected.

    The keyboard

    Traditionally the keyboard is connected using a DIN or PS/2 mini DIN plug. Soon we shall have USB keyboards but the old ones connect to the internal ISA bus occupying an IRQ.

    The keyboard operates with scan codes, which are generated each time a key is pressed and released. The scan codes are translated into ASCII values, which are translated according to the code pages (see module 1a and 1b). Here you see a simple illustration of the system:

    This system is quite flexible because it allows for arbitrary remapping of the keyboard codes. This is especially useful if you find the placement of the Caps Lock and Control keys awkward. It's a simple matter to remap them to swap places.

    Each key generates a unique scan code. This happens completely independent of the typeface that is printed on the plastic key.

    At the other end, the code pages represents a programmable interpretation of the key press; you can assign any type to any key as you want it. Languages like German and French use different keyboard layouts as well as many other languages.

  • Next page
  • Previous page

    Learn more

    Read: Module 5b about EIDE, Ultra DMA and AGP.

    Read Module 5c about SCSI, USB etc.

    Read A little about Windows 95/98.

    Read Module 6c about the relationship between BIOS, OS and hardware

    Read Module 7a about the videosystem

    Read about video cards in Module 7b.

    Read about digital sound in Module 7c.

    [Main page]
    [Karbo's Dictionary]
    [The Software Guides]

    Copyright (c) 1996-2005 by Michael B. Karbo. www.karbosguide.com.