Unit 3: Microcomputers and Microprocessors: Lesson 1: Microcomputer and Organization
Unit 3: Microcomputers and Microprocessors: Lesson 1: Microcomputer and Organization
53
Computer Basics
I/O Interface
Two general types of interface devices in use are serial and parallel. A
serial interface transmits data as a string of bits, one bit after the other,
over a single wire. A parallel interface transmits data byte by byte
through a multiwire cable.
Parallel interface devices are faster, but are more costly. The interface
must match the requirements of the device it supports.
54
Microcomputers and Microprocessors
Control Lines
Data Lines
MPU
Address
Lines
Input/Output Methods
There are three basic methods by which data can be read (or input) from
or written (or output) to a peripheral device and RAM. These methods
are referred to as: programmed I/O, interrupt I/O, and direct memory
access.
In programmed I/O, the MPU directly controls all data transfers and
other I/O operations. This is accomplished with input or output
instructions. When an input operation is desired, the MPU issues an
55
Computer Basics
input command and awaits the arrival of the data at the bus. From the
bus the data are moved to memory. Similarly for an output operation, the
MPU transmits the data to the bus and issues a command to the output
device through the appropriate interface. Once data transfer is initiated,
the MPU should wait for its completion and the bus to be freed before
beginning a new transfer. This method is commonly used in personal
computers.
In the interrupt I/O method, the MPU does not wait for the input/output
devices to complete their tasks. The control of the operation is given to a
Interrupt I/O method channel. The channel signals the MPU when the operation has been
completed. This is accomplished by means of an interrupt. Upon
completion of the execution of the current instruction, the MPU may
then initiate another I/O operation.
56
Microcomputers and Microprocessors
1.3 Exercise
(i) ROM
(ii) Microprocessor
(iii) Motherboard
(iv) Bus system.
a. What is a bus?
b. What is the difference between serial and parallel interfaces?
c. Write down the names of three of basic methods by which data
can be input from or output to a peripheral device and RAM.
3. Analytical question
57
Computer Basics
58
Microcomputers and Microprocessors
Accumulator
Memory
Unit
Logic Control Unit
circuit
Register
Decision Making
59
Computer Basics
Control
Unit
Computers Instructions
Commands
Primary
Storage
Unit
Arithmetic/
Logic Data
Unit
Results
CPU
60
Microcomputers and Microprocessors
Machine Cycles
Instruction Format
61
Computer Basics
contains the operation code MOV and the operands 8000 and 9000. This
could mean that the machine is to move the contents of storage location
8000 to storage location 9000. In addition to the address of an item of
data in primary storage, an operand can be used to indicate the address
of a register, the address of data stored in secondary storage, or even the
address of an input or output device.
Instruction Execution
Instruction Cycle
Instruction Cycle 1. The instruction is fetched from primary storage and placed in a
register called a storage register. This is accomplished by the
control unit. When program execution is initiated, the instruction
counter is set to the address of the first program instruction. As
instructions are executed the instruction counter is updated so
that it always contains the address of the next instruction to be
executed.
62
Microcomputers and Microprocessors
Primary Storage
1 Instruction
Storage Register
2 3
Op Code Operand
4
Operation Decoders
Instruction Counter
Instructions are executed one after the other. Normally next instruction
will be located immediately after the current instruction in storage. Its
address is simply the address of the current instruction plus the number
of locations occupied by the current instruction. Some times it becomes
necessary in a program to branch, or transfer control, to an instruction
other than the next instruction. In such cases, the current instruction
indicates the address of the next instruction. This address is then placed
in the instruction counter, and the sequential execution of instructions is
resumed until another branch instruction is encountered.
Execution Cycle
63
Computer Basics
64
Microcomputers and Microprocessors
2.5 Exercise
a. What is a microprocessor?
b. What are the functional units of a microprocessor?
c. Briefly write the functions of ALU.
d. Define the terms: register and operand.
3. Analytical questions
65
Computer Basics
3.3 CISC
66
Microcomputers and Microprocessors
3.4 RISC
67
Computer Basics
Other Processors
68
Microcomputers and Microprocessors
3.6 Exercise
(i) RISC
(ii) CISC
(iii) DSP
(iv) VLIW.
(i) AMD
(ii) Cyrix
(iii) Motorola
(iv) Intel.
(i) 80486DX
(ii) 80386
(iii) 80286
(iv) none of them.
3. Analytical questions
69
Computer Basics
70