Chapter Two Hardware Software
Chapter Two Hardware Software
Chapter Two Hardware Software
CHAPTER TWO
HOW SW & HW WORK TOGETHER
…………………………………………………………………………………
Chapter Objectives
Upon completion of this chapter, the student will be able to:
Classify buses in different ways
Describe the common bus technologies
Describe & explain the booting process
Describe hardware resources in a PC
Enter CMOS setup & perform configuration
Sub-topics
2.1 Introduction to buses
2.2 Technologies of buses
2.3 The booting process
2.4 HW resources in PC
2.5 BIOS/CMOS setup
…………………………………………………………………………………………
2.1 Introduction to buses
ribbon cable
Buses are electronic pathways or data channels or physical connections along which
binary bits (0s & 1s) pass e.g. metal tracks on PCBs, ribbon cables.
CPU uses buses to communicate, by sending data, addresses and control signals to
components inside and outside the system unit.
Buses can be classified:
1. By location 2. By function 3. Broadly
Note:
1
CE211 COMPUTER HW & MAINTENANCE I
All I/O devices communicate directly with each other and with main memory (RAM) via
the different I/O buses, except the CPU.
Classification by location
1. Internal buses 2. External buses
Internal buses
These are system buses that connect the different internal components inside the system unit
on the motherboard. They enable CPU, main memory (RAM) and all other components on
the motherboard to communicate. For example, metal tracks (found on MB, expansion
cards & slots).
External buses
These are peripheral buses used to expand the internal buses. They enable communication
between CPU and external components (I/O devices & external storage devices). They can
be parallel buses (e.g. ribbon cables) or serial buses (e.g. USB).They are generally slower
than the internal buses (system buses). For example, USB ports and data cables for external
hard disks.
Classification by function
1. Address buses 2. Data buses 3. Control buses
Address buses
Also known as memory buses; carry memory addresses from CPU to main memory (RAM)
and to I/O devices (peripherals). They are unidirectional buses (one way traffic).The
memory addresses are for memory locations that store data. The width (size) of the address
bus corresponds to the number of memory locations that can be accessed. The CPU keeps
track of which data is stored where, using memory addresses.
Data buses
They carry data from main memory (RAM) and I/O devices (peripherals) to the CPU for
execution. They also carry data from CPU to main memory (RAM) and I/O devices
(peripherals). This means they are bidirectional buses, but can only transmit in one direction
at a time. Data is stored, manipulated and processed in main memory (RAM).
Control buses
Also known as command buses, carry instructions (control & coordination signals) from
CPU (control unit) to main memory (RAM) and to I/O devices (peripherals). They also
carry response signals from main memory (RAM) and I/O devices (peripherals) to CPU.
This means they are bidirectional buses, but can only transmit in one direction at a time.
The instructions (signals) include: read, write, interrupt, acknowledge.
2
CE211 COMPUTER HW & MAINTENANCE I
Buses
I/O devices
OR
Peripherals Controller
(Interface)
Classification broadly
1. System buses 2. Peripheral buses
System buses
Also known as local buses (older designs) or front-side buses (newer designs). These are
internal buses between CPU and main memory (RAM). They transfer data at high speed
using parallel communication e.g. 32-bit bus sends data over 32 wires simultaneously.
Modern system bus is 64-bit and runs at 66, 100 or 133MHz.
3
CE211 COMPUTER HW & MAINTENANCE I
Peripheral buses
These are pathways between CPU and peripherals (I/O devices) e.g. hard disks, RAM
modules, video card, sound card, printer. They are extensions to system bus which ends in a
chipset (a controller chip on the motherboard).Sometimes known as I/O buses, if they
connect CPU to I/O devices. They transfer data at low speed by serial or parallel
communication. They are either internal (e.g. ribbon cables) or external (e.g. ports).
4
CE211 COMPUTER HW & MAINTENANCE I
Bus speed
Also known as data rate? Or frequency, refers to number of times a group of bits can be
sent per second. It is measured in Hz (hertz), but practical unit is MHz (mega hertz). It is the
number of bits per line per clock cycle of CPU. Clock cycle (bus cycle) occurs every time
data travels from memory to the CPU.
Most buses transmit 1 bit of data per line per clock cycle, and newer buses may move 2 bits
of data per line per clock cycle e.g. AGP (Accelerated Graphics Port) for video cards.
Older buses may move 1 bit per line per 2 clock cycles e.g. ISA (Industry Standard
Architecture).
Bus bandwidth
Also called throughput, refers to maximum transfer speed of bus. Refers to number of
bits that can be sent to CPU simultaneously. It is measured in bps (bits per second), but
practical unit is mbps (megabytes per second).
Note:
Bus bandwidth (in bps) = bus width (in bits) x bus speed (in Hz)
For example, 16 bit bus width with frequency of 133 MHz:
Bus bandwidth = 16 x 133x106 = 2128x106 bps =266MBps
System RAM speed is controlled by:
1. Bus width (in bits) 2. Bus speed (in HZ frequency)
For example, theoretically:
100 MHz 32 bit bus sends 32 bits (4 bytes) to CPU at 100x106 times per second.
66 MHz 16 bit bus sends 16 bits (2 bytes) to CPU at 66x106 times per second.
Qn.
How much data does 100 MHz 32 bit send compared to 100 MHz 32 bit system through
CPU?
ISA bus
5
CE211 COMPUTER HW & MAINTENANCE I
L: 8-bit ISA exp. slot R: 16-bit ISA exp.slot with alignment key
EISA bus
EISA (Extended ISA) is 32-bit developed by Compaq in 1987. It provides backward
compatibility to 16-bit ISA bus, by having 2 rows i.e. upper 16-bit & lower 32-bit. Runs at
the same speed (8MHz) as 16-bit ISA bus, to be compatible. The design was exposed to all
manufacturers i.e. compatible with other technologies (not proprietary).
Note:
Compaq borrowed a lot of features from MCA and expanded on them.
EISA bus never became popular in desktop PCs (unlike VESA & PCI) and can only be
found in server PCs and higher-end PCs.
32-bit EISA bus for servers is synchronous with CPU 8MHz (max.) and data rate
32mbps.
SCSI Interface card once used in a powerful network server is an example of EISA bus
card.
6
CE211 COMPUTER HW & MAINTENANCE I
PCI bus
Alignment key
7
CE211 COMPUTER HW & MAINTENANCE I
AGP bus
8
CE211 COMPUTER HW & MAINTENANCE I
Note:
PCI & AGP expansion slots are left empty for future upgrading.
Before AGP bus, video cards were installed in PCI expansion slots.
A second video card can be installed in a PCI expansion slot.
Note:
PCIe (PCI-Express), is designed to replace the older PCI, PCI-X and AGP bus standards.
(See advantages of PCI-Express bus).
Many modern MBs have no AGP slots, since their chipsets have no AGP support.
However, some MBs are produced with older chipsets that have AGP support.
Many manufacturers of graphics cards continue to produce AGP cards for the
disappearing AGP market.
9
CE211 COMPUTER HW & MAINTENANCE I
MCA bus
- MCA (Micro Channel Architecture) was a proprietary parallel bus was introduced by
IBM in 1987 for use on new PS/2 computers.
- Proprietary means incompatible (not to standards) i.e. PCs with MCA bus used only
MCA expansion cards.
- Because, MCA expansion cards were smaller and used different edge connectors.
- It was available in mainly 32-bit, but also 16-bit bus with clock speed 10MHz.
- The 16-bit was used to lower the cost in Intel-based machines e.g. PS/2.
- One of 6-bit slots had additional 20-pin video extension connector for graphics cards.
- The 32-bit slots had additional 8-pin matched memory extension connector.
10
CE211 COMPUTER HW & MAINTENANCE I
Note:
The MCA bus never became widely used and has since been phased out of desktop
computers (disappeared with the introduction of PCI).
Why? The small market for MCA made it very expensive.
Very few MCA sound cards were ever produced compared to ISA and PCI sound cards.
Advantages of VL
1. Commonly used for video to gain the advantage of the high speed of transfer of CPU.
2. Supports both 16-bit (allows backward compatibility for 16-bit ISA bus) and its own
32-bits (has extra expansion slot).
Cold booting
This is the process of switching on the PC from the mains wall socket. POST (Power on
Self-Test) routines run first, then later OS is loaded into main memory (RAM).
11
CE211 COMPUTER HW & MAINTENANCE I
Warm booting
This is the process of restarting the PC when it is already switched on. The PC can be
started again from stand-by or hibernating modes. This type skips POST and immediately
OS is loaded into RAM. Warm booting is used as a troubleshooting technique e.g. when a
program is not responding (taking long).
It is done by one of the following:
Reset button on PC
Windows restart command i.e. Start>Shutdown>Restart.
Combination of keys i.e. Ctrl+Alt+Del.
How can you decrease boot time?
Note:
The boot loader (e.g. ntldr in Windows OS) resides in boot sector of bootable device.
12
CE211 COMPUTER HW & MAINTENANCE I
The boot loader takes control of the computer from the POST process.
It is also responsible for locating and loading the rest of OS files.
Error may be reported e.g. if no bootable device is missing, OS is corrupted by viruses.
Interfaces
They are circuitry needed to connect I/O devices/peripherals to buses.
They are used to manage transfer of data between devices/peripherals and CPU.
Examples of interfaces are:
Ports on expansion cards and I/O devices.
Connectors of ribbon cables and hard disk drive.
Controllers
They are circuitry or chips with program logic (intelligence) used to operate and control a
device.
Initiates commands and senses status of a device.
Controllers are found on motherboards or on expansion cards or housed inside devices,
depending on technology.
Devices of the same type can share the same controller e.g. drives (hard disk drive, CD-
ROM drive).
Examples of controllers are:
IRQ, DMA, USB, IDE controllers on the motherboard.
AGP or CRT, SCSI controllers on expansion cards.
Printer controller on printer.
13
CE211 COMPUTER HW & MAINTENANCE I
See hard disk drive technologies later-Chap 6 e.g. IDE, SATA & SCSI.
See also IRQ and DMA controllers below.
Note:
Printer controller controls paper motion, print timing and selection of printing characters.
Summary of differences
CPU Devices
High speed Low speed
Uses digital (binary format) Use different formats
e.g. sound (audio), video (graphics)
Electronic in nature Electrical or mechanical
2.4 HW resources in PC
HW resources allow I/O devices (peripherals) and CPU to communicate with each other.
HW resources include:
1. IRQs
2. Memory addresses
3. I/O addresses
4. DMAs
The device is first assigned HW resources before CPU can communicate to it.
See configuration data in BIOS/CMOS setup.
To view HW resources using Windows OS
Go to System Information>Hardware Resources. How?
IRQ
IRQ stands for Interrupt Request and simply known as interrupt.
There are 2 types of interrupts:
1. Hardware interrupts -bus feature (adapter or unit on I/O bus).
2. Software interrupts -used to call BIOS routines.
We are concerned with hardware interrupts in this course unit.
Hardware interrupts
The hardware interrupt allows a device to signal the CPU for immediate attention.
The device signals CPU to suspend whatever it is doing and attend to it.
The signal is a voltage applied to one of the lines (wires) in the bus.
Physically, IRQ is a wire (line) on the bus.
14
CE211 COMPUTER HW & MAINTENANCE I
CPU acknowledges the signal, suspends process (running program) and attends to the
device (branches to interrupt service routine).
The service routine processes the interrupt and when complete, returns control to the
suspended process (running program).
Examples of interrupts are:
A hard disk drive ready to receive or send data.
A printer running out of paper and needs to load.
Interrupt generated by a keystroke or a mouse click.
IRQ signals run along IRQ lines (wires) to the IRQ controller on the MB.
IRQ lines (wires) connect to all expansion slots, making the expansion cards (adapters) to
communicate with CPU.
IRQ controller assigns priorities to incoming IRQs to be sent to CPU.
IRQ lines (wires) are also known as IRQ channels.
When you install expansion card in a vacant expansion slot, one of the IRQ channels is
assigned to it automatically (plug and play).
Original PC/XT bus had 8 IRQ channels, while ISA bus has 15 IRQ channels.
But newer PCs have a total 16 IRQ channels (or more), of these 5 IRQ channels are internal
and cannot be used with I/O cards.
IRQs can be assigned manually in BIOS/CMOS set up or by plug and play (auto-
configuration).
Note:
1. Missing IRQs e.g. 2-7, 10, 12, 17, 20-22
These IRQ numbers have been reserved and are not available for Windows OS to issue.
2. Usually one device per IRQ
Assign IRQ to a new device when configuring & physical installation.
15
CE211 COMPUTER HW & MAINTENANCE I
Memory addresses
Memory addresses are addresses for memory locations called cells.
A memory address is assigned to each device and gives the memory location of the required
subroutine the CPU needs to service the device.
These subroutines are usually found in the ROM BIOS or other ROM chips.
CPU specifies memory addresses of memory locations and I/O devices.
Addresses are transmitted along address buses (lines) using appropriate interface.
I/O addresses
These are unique memory addresses where information about each I/O device is kept.
CPU sends information to or reads information from the I/O address.
Some important components (e.g. hard disk controller, video card) have I/O addresses
reserved for them.
While others (e.g. printers, scanners) need to have I/O addresses assigned (during
configuration).
I/O addresses can be assigned manually in BIOS/CMOS set up or by plug and play (auto-
configuration).
Note:
Both memory and I/O addresses are bit combinations forming address space.
For example:
2 bits give 22 = 4 addresses, with address space = 00, 01, 10, 11
General formula: n bits give 2n addresses.
Both memory and I/O addresses are usually expressed in hexadecimal (base 16), with
characters = 0, 1, 2, 3,… 9, A, B, C, D, E, F
16
CE211 COMPUTER HW & MAINTENANCE I
Note:
Some devices need more memory locations (addresses).
Some devices have a set of addresses used as for different functions.
DMA
DMA stands for Direct Memory Access, which is a bus feature that allows devices to
transfer data between main memory (RAM) and I/O devices without CPU intervention.
The devices bypass CPU and write their information directly into main memory (RAM).
Valuable CPU time is spared for other devices or tasks.
This is another I/O interfacing technique on addition to IRQ.
DMA controller (found on MB) communicates to CPU on behalf of the I/O device ie it is
designed to service one or more I/O devices.
CPU only initiates DMA by sending DMA address located in memory.
When transfer of data is complete DMA controller sends an IRQ to CPU.
DMAs are used by high speed devices, where large amounts of data are transferred eg
magnetic disks (hard disks, tape drives).
Memory
(RAM)
I/O
DMA Device
CPU
17
CE211 COMPUTER HW & MAINTENANCE I
DMA channel is a service interface and standard PCs have two DMA controllers (DMA1
& DMA2) and a total of 8 channels.
1. DMA1 has Channels 0, 1, 2 & 3 –use 1 byte (8 bits) per transfer.
2. DMA2 has Channels 4, 5, 6 & 7 –use 2 bytes (16 bits) per transfer.
DMA channels can be assigned manually in BIOS/CMOS set up or by plug and play (auto-
configuration).
See BIOS/CMOS setup below.
Note:
1. Two devices should not share same DMA channel
If two devices are assigned same DMA channel, both will not work.
Each type of bus has different DMA channels available.
2. Clock signals are measured in MHz (mega hertz) or GHz (giga hertz).
3. Internal click determines CPU speed, while bus clock determines the bus speed.
4. Bus mastering is a bus feature where some expansion buses take direct control of the
external data bus and perform tasks without CPU intervention.
5. Bus mastering is much faster than DMA and therefore tasks are accomplished faster.
Qn. What is the difference between ROM BIOS and CMOS RAM?
18
CE211 COMPUTER HW & MAINTENANCE I
CMOS RAM (volatile) is Complementary Metal Oxide Semiconductor, while ROM BIOS
(non-volatile) is Basic Input Output System (also known as System BIOS). <See ROM
BIOS above>
BIOS and CMOS are 2 different microchips on the motherboard, though related. How are
they related? CMOS RAM do not store programs, but instead it is where the BIOS stores
system settings or configuration data (information) for startup e.g. date and time, disk
information.
ROM BIOS contains a program for booting a PC and is only modified or updated with
BIOS updates.
CMOS RAM is powered by a CMOS battery and is modified (changed) by entering the
CMOS setup.
Note:
Although the setup is often referred to as the BIOS / CMOS setup, it is more appropriate
to use CMOS setup.
Manufacturers of motherboards buy BIOS from BIOS manufacturers (eg Phoenix BIOS,
AMI BIOS) and then may make a few changes.
BIOS updates
Computer or motherboard manufacturer periodically updates the BIOS to e.g. fix bugs
(errors), add compatibility with new devices, to speed up boot time.
The BIOS updates are available at the manufacturer's website.
19
CE211 COMPUTER HW & MAINTENANCE I
20
CE211 COMPUTER HW & MAINTENANCE I
1. Press key shown on screen at setup (just before booting) Normally used are:
Del, Ctrl, ESC, F2, F10
2. This program is independent of OS (loaded or not loaded) and no need to have hard
disk drive.
3. It depends on the manufacturer of BIOS, but not manufacturer of PC. BIOS
manufacturer and version number are displayed.
21
CE211 COMPUTER HW & MAINTENANCE I
22
CE211 COMPUTER HW & MAINTENANCE I
Note:
System settings are the only way of getting information about what options are installed. If
not set accurately an ERROR occurs.
Suspect configuration problems if a PC fails to operate immediately after a new device has
been installed.
For example, if the hard disk drive information is incorrect it might not be accessible.
When this happens, it is advisable to reset the CMOS setup so that is properly defined in the
CMOS registry.
Note:
It is important for the core information on a CMOS RAM chip to be correct.
If you change any of the related hardware, the CMOS must be updated to reflect those
changes.
If the CMOS loses power from its battery, it will lose its data. The next time the system
is started, the setup program will revert to its default settings.
It is a good idea to write down the primary system settings (like hard drive parameters)
and tape them inside the case for reference.
23
CE211 COMPUTER HW & MAINTENANCE I
Friction
For example rubbing your body on the chair or walking across the floor or removing a
carpet from the floor.
A spark may be produced in dry conditions when touching a doorknob after walking across
a carpeted floor.
Induction
For example unwrapping a PCB (Printed Circuit Board) from a plastic container.
Precautions against ESD
1. Avoid touching pins / leads of microchips, because hands may have accumulated charges
(ESD).
2. Discharge yourself (grounding) before working on any of the electronic components on
the printed circuit board.
Why?
To ensure zero potential between your body and the PC.
How?
1. Touch unpainted metallic part of PC chassis or power supply.
2. Use ESD wrist strap or grounding mat or table.
3. Stand all the time, since sitting creates ESD on the chair.
4. Avoid putting on woolen clothes, because they create ESD.
24