1.4 Input and Output (I/O)
The CPU of a microcomputer cannot do anything until it has data with which to work. All data that enters the CPU for processing originally comes from devices located outside the box that houses the CPU. These devices are called input devices because their function is to get data into the computer. Input devices can consist of such things as the keyboard, a floppy or hard disk, a mouse, another computer, or a laboratory instrument. Figure 1.8 illustrates some common input devices. They will be discussed more fully in this section.
In order to know what the CPU is doing, we must be able to view its operation. In order to do this, data must be sent out of the CPU to output devices. These may consist of printers, plotters, and video monitors. Output can also be stored for later viewing by sending it to floppy or hard disks. Output devices will be discussed in section 1.6 and disk storage is covered in section 1.8. Input and output are collectively known in computer jargon as I/O.
Data that are entered into the computer must be stored while waiting to be processed by the CPU. Data must also have someplace to go after being processed. The area of the computer that holds data is called the memory. The different types of computer memory are discussed in section 1.7. All of the electronic and mechanical components of a microcomputer system are collectively known as the hardware.
In summary, a microcomputer consists of a central processing unit that accepts data from an input device, processes the data, and then sends it to an output device. During the processing, data are stored in the computer's memory. A typical microcomputer configuration is shown in Figure 1.8.
Figure 1.8 Typical Microcomputer Hardware
1.5 Input Devices
When a microcomputer is first turned on, its memory is empty. Before it can begin processing any of your data, you must somehow get your data into the memory of the microcomputer. The four most common methods of entering data into a computer are shown below.
Most information that is processed by a computer originally gets into the computer by being typed in from a keyboard. Figure 1.9 is a diagram of a standard PC keyboard.
Figure 1.9 PC Keyboard and QWERTY Keys
The keyboard is divided into three sections. The main section looks much like a standard typewriter keyboard. It contains all the letters of the alphabet, standard punctuation symbols, the numbers zero through nine, and several special purpose keys. The arrangement of the keys in the main section is referred to as a QWERTY format, which comes from the order of the first six keys in the second row.
The keys across the top are called special function keys (or just function keys). Unlike the keys in the main section, what happens when you press a function key depends on what software you are running. Software is a general term used to describe the programs that control the operation of the microcomputer. Different programs define the operation of the function keys in different ways.
On the right side of the keyboard is the numeric keypad. The keys in this section are arranged like those on a calculator and are designed to speed the entry of numeric data. The NUM LOCK (number lock) key, when pressed, toggles the numeric keypad between the number mode and the cursor control arrow mode.
Another popular input device is the mouse. A mouse is a device used to control the motion of the cursor (the object on the screen that shows where the next user action will take place) on the video display. When the mouse is rolled around on the desktop, a rubber ball pushes against rollers which signal the position and acceleration of the mouse to the computer. Buttons on the top of the mouse provide input for making selections and dragging objects around on the screen. Most mice use an optomechanical mechanism for sensing position and acceleration. The rollers inside the mouse turn perforated disks that have light sources on one side and light detectors on the other. The outside and inside of a typical two-button mouse are shown in Figure 1.10.
Figure 1.10 A Typical PC Mouse
If data have previously been saved to a secondary storage device such as a floppy disk, then this data can serve as input to the computer. Secondary storage devices are covered more fully in section 1.8. The use of analog-to-digital converters as input devices is examined in separate lessons.
1.6 Output Devices
In order for the user to view the results of the microcomputer's work, data must be sent from the microcomputer to an output device. Typical output devices are video monitors, printers, modems, and secondary storage devices (disk drives) that can hold data for use at a later time. The output device found on nearly all microcomputers is the video monitor or just monitor. A video monitor is also known as a CRT (cathode ray tube) or more simply as the screen. In order for the video monitor to operate, a video display adapter card must be installed in the computer. The combination of video display card and video monitor (Figure 1.11) determines the resolution and color depth that will be seen on the screen.
Figure 1.11 Video Monitor and Video Display Adapter
The resolution of a video display is measured by the number of horizontal and vertical pixels that can be displayed. The word pixel is an abbreviation of the two words picture element. A pixel is the smallest portion of the video display that can be used to create images (Figures 1.12 and 1.13)
Figure 1.12 Representation of a Pixel
Figure 1.13 Magnified View of Pixel
Each pixel in a color monitor is composed of three phosphor dots. These dots glow when struck by an electron beam with each dot glowing a different color (red, green, or blue). The intensity of the electron beam determines how brightly each dot will glow. If each dot glows with equal brightness, the resulting color will be white. A wide range of colors can be produced by varying the intensity of the electron beam striking each dot.
The color depth of a video display is a measure of the number of colors that can be displayed at one time. This, in turn, is a function of the number of bits of data that are used to represent the color information in each pixel. For example, a video display system that stores 8 bits of color information for each pixel is capable of displaying 256 different colors (28 = 256 colors). The term high color is used to describe a 16-bit color display (216 = 65,536 colors) while the term true color is used to describe a 24-bit color display (224 = 16,777,216 colors).
Over the years, names have been assigned to various combinations of resolution and color depth. The lowest common denominator in use today is the VGA standard (Video Graphics Array). IBM developed the VGA standard and introduced it with their ill-fated Micro-Channel bus line of microcomputers (named the PS/2 series) in 1987. All microcomputers today are capable of displaying VGA graphics. Other combinations of resolution and color depth are known as SVGA (Super VGA) and XGA (eXtended Graphics Array). The resolutions and color depths of these standards are shown in Table 1.2.
Table 1.2 Video Display Standards
Many extensions of these standards exist which provide for higher resolutions and higher color depths. The most common combination in use today is 800 X 600 resolution with 24-bit color.
Another important characteristic of a video display is its refresh rate. The electron beam that produces the image on a video display scans the screen line by line from top to bottom. The refresh rate is the number of times per second that the entire screen is reproduced. Refresh rates below 70 Hz will produce a noticeable flicker in the image displayed on the screen.
The second most common output device is the printer. Most printers today are referred to as dot matrix printers meaning that they produce their output by creating a matrix of tiny dots that, when viewed without magnification, appear as seamless letters, numbers, and graphics. The greater the potential number of dots in the matrix, the better the printed copy will look. A magnified view of dot matrix output is shown in Figure 1.14.
Figure 1.14 A 5 X 7 Dot Matrix Display
Despite their many differences, most printers can be placed in one of two categories.
Figure 1.15 Epson FX-880 Impact Printer
Figure 1.16 Hewlett-Packard 6p Laser Printer
1.7 Primary Memory
A microcomputer would be incapable of performing even the simplest task if it did not contain some type of memory. Consider an example where you want the microcomputer to add the numbers 2 and 2. When you type the first 2 in from the keyboard, the CPU does not yet know what you intend to do with it so it has to store the number. When you enter the plus sign it now knows you intend to do some arithmetic but it still needs another number. Finally, you
enter the second 2 and the CPU performs the calculation and stores the result in memory. A microcomputer uses memory to store the programs that control its operation, to store data waiting for processing, and to store the results of operations performed by the CPU.
Primary memory, or storage, is electronic memory that is directly addressable by the CPU. This memory is contained in integrated circuits called memory chips. Each memory location is assigned a number called an address. The CPU uses these addresses to keep track of information stored in memory. Since primary memory is completely electronic, transfer of data to and from it is extremely fast.
A microcomputer contains several types of primary memory. RAM (Random Access Memory) is used for storing information that changes frequently. This is the memory in a computer that is accessible to the user. RAM is used to store user programs that control what the CPU does. It stores the data used by these programs and the results of operations performed by these programs. How much RAM a computer has determines the size and sophistication of the tasks a microcomputer can perform. This is the memory in a microcomputer that is normally referenced in the computers specifications. Todays microcomputers typically have 32 MB or more of RAM. RAM is an example of volatile memory. This means that everything stored in RAM is lost when the power is turned off - even for an instant.
RAM memory chips are usually found as part of a SIMM (Single In-line Memory Module) or a DIMM (Dual In-line Memory Module). SIMMs and DIMMs are small circuit boards containing RAM memory chips. These circuit boards plug into special sockets located on the motherboard of the microcomputer. SIMMs have 72 pins on the connector edge of the circuit board and support 32-bit memory transfers (32-bit memory bus). DIMMs have 168 connectors and support 64-bit memory transfers. A SIMM and DIMM are shown in Figure 1.17. Click here for a video clip showing the installation of a SIMM module (Format: RealVideo; Size: 200 K).
Figure 1.17 72-pin SIMM (top) and 168-pin DIMM (bottom)
Another type of memory found in all microcomputers is ROM (Read Only Memory). ROM can be read by the user but cannot be altered. ROM is nonvolatile which means it retains the information stored in it even when the power is turned off. ROM is used primarily to store the instructions a microcomputer needs to get itself started after you turn on the power. These instructions are called the BIOS (Basic Input/Output System). This start up process is called booting or bootstrapping and figuratively means that the computer pulls itself up by its own bootstraps. The BIOS is placed in ROM by the computer manufacturer and cannot be altered by the user.
Examples of other kinds of memory chips include, PROM, EPROM, and EEPROM. PROM (Programmable Read Only Memory) is a type of ROM that can be programmed by the user. However, once it is programmed, the contents cannot be changed. The ROM chip in a microcomputer starts out as a PROM chip. After being programmed by the manufacturer, it can only be read, not written to again. EPROM (Erasable Programmable Read Only Memory) is a type of PROM chip that can be erased and reprogrammed. An EPROM chip is erased by shining ultraviolet light on it through a quartz window located on top of the chip. A diagram of an EPROM chip is shown in Figure 1.18. EEPROM (Electronically Erasable Programmable Read Only Memory) is much like EPROM except that EEPROM chips can be erased by an electrical signal instead of ultraviolet light.
Figure 1.18 EPROM Chip
In addition to their use in microcomputers, EEPROM chips are used in a variety of household devices that must retain programmed settings such a televisions, clocks, and microwave ovens.