100% found this document useful (1 vote)
20 views17 pages

Micro - Computer System Design Unit 4

Microcomputer systems are small, cost-effective computers designed for individual use, consisting of a microprocessor, memory, and I/O circuitry. The microprocessor performs arithmetic and logical operations, while memory types include volatile (RAM) and non-volatile (ROM) options. Additionally, the document discusses instruction sets, addressing modes, subroutines, interrupts, and memory organization, emphasizing their roles in computer architecture.

Uploaded by

vedanta.rcr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
20 views17 pages

Micro - Computer System Design Unit 4

Microcomputer systems are small, cost-effective computers designed for individual use, consisting of a microprocessor, memory, and I/O circuitry. The microprocessor performs arithmetic and logical operations, while memory types include volatile (RAM) and non-volatile (ROM) options. Additionally, the document discusses instruction sets, addressing modes, subroutines, interrupts, and memory organization, emphasizing their roles in computer architecture.

Uploaded by

vedanta.rcr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Micro – computer System Design

Micro – computer System Design


Microcomputer: It is a small, relatively inexpensive Computer with a microprocessor as its Central
Processing Unit (CPU). It includes a microprocessor, memory, and minimal input/output (I/O) circuitry
mounted on a single Printed Circuit Board (PCB).
Microcomputer is designed for individual use and is smaller in size than a mainframe or a minicomputer.

Organization of Microcomputer:- i) Microprocessor ii) Memory iii) Input unit iv)Output unit

Microprocessor is a multipurpose, programmable logical device that reads binary instructions from
memory, accepts binary data as an input & processes the data according to those instructions and provides
the result as an output. Microprocessor has 3 minimum components:
a) ALU [Arithmetic Logical Unit]:-In this area of microprocessor, various computing functions are
performed on data. It performs arithmetic operations as well as logical operations.
b) Register Array:-It consists of various registers. These registers are primary used to store the data
temporarily during the execution of the program.
c) Control unit [CU]: - provides the necessary timing & control signals to all the operations in the
microprocessor system.

2Memory: - to store program/ instructions and data. The semiconductor memories are of two types ROM
and RAM.

ROM (Read-only memory): ROM is a type of memory that does not lose its contents when the power is
turned off, hence ROM is called nonvolatile memory. There are different types of read- only memory.
They are PROM, EPROM, EEPROM, flash and masked ROM

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 1


Micro – computer System Design

Input unit:- This section supplies the data and instructions in binary form to the system. e.g.- keyboard.
. Output Unit:- This section transfers the data from microprocessor to the O/P devices such as 7- segment
display, CRT screen, printer etc.

Address Bus:- It is unidirectional bus which carries addresses from microprocessor to peripheral devices.
Data Bus:- It is a bidirectional bus which transfers the data between microprocessor and peripherals.
Control Bus:- Control bus consists of control signals which are given out by control unit of
microprocessor to peripheral.

A Microprocessor is is a programmable device that takes in input, performs


some arithmetic and logical operations over it and produces the desired
output. Microprocessor is a digital device on a chip that can fetch
instructions from memory, decode and execute them, and give results. It is
an important part of a computer architecture without which you will not be
able to perform anything on your computer.

Block Diagram of a Microprocessor


A Microprocessor takes a bunch of instructions in machine language and
executes them, telling the processor what it has to do. The microprocessor
performs three basic things while executing the instruction:
 It performs some basic operations like addition, subtraction, multiplication,
division, and some logical operations using its Arithmetic and Logical Unit
(ALU). New Microprocessors also perform operations on floating-point
numbers.
 Data in microprocessors can move from one location to another.

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 2


Micro – computer System Design

 It has a Program Counter (PC) register that stores the address of the next
instruction based on the value of the PC, Microprocessor jumps from one
location to another and makes decisions.


 A typical Microprocessor structure looks like this

An instruction is a command that tells a computer what to do, like add two numbers or move
data. Instructions can be categorized by the operations they perform, such as arithmetic, logical,
data transfer, and control flow. Instruction formats also vary, including zero, one, two, and three-
address instructions.

An instruction set, also known as an instruction set architecture (ISA), is a set of commands that
a microprocessor can understand and execute. These instructions tell the processor what
operations to perform, such as arithmetic, data manipulation, and input/output operations.
Types of Instructions:
 Data Transfer: Moves data between memory, registers, and I/O devices. Examples
include load, store, and exchange.
 Arithmetic: Performs mathematical operations like addition, subtraction, multiplication,
and division.
 Logical: Performs bitwise operations like AND, OR, XOR, and NOT.
 Control Flow: Determines the sequence of execution, including branch (jump)
instructions and conditional jumps.

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 3


Micro – computer System Design

 I/O: Enables communication with external devices, such as input and output
operations.
 Memory Reference: Instructions that access data or instructions stored in memory.
 Register Reference: Instructions that operate on data stored in CPU registers.
 Vector Instructions: Operate on multiple data values simultaneously, also known as
SIMD (Single Instruction, Multiple Data

Addressing modes are the techniques used by the CPU to identify where
the data needed for an operation is stored. They provide rules for interpreting
or modifying the address field in an instruction before accessing the operand.

Types of Addressing Modes


There are various types of Addressing Modes which are as follows −
Implied Mode − In this mode, the operands are specified implicitly in the
definition of the instruction. For example, the instruction "complement
accumulator" is an implied-mode instruction because the operand in the
accumulator register is implied in the definition of the instruction. All register
reference instructions that use an accumulator are implied-mode instructions.
Instruction format with mode field
Opcode Mode Address

Immediate Mode − In this mode, the operand is specified in the instruction


itself. In other words, an immediate-mode instruction has an operand field
instead of an address field. The operand field includes the actual operand to be
used in conjunction with the operation determined in the instruction. Immediate-
mode instructions are beneficial for initializing registers to a constant value.
Register Mode − In this mode, the operands are in registers that reside within
the CPU. The specific register is selected from a register field in the instruction.
A k-bit field can determine any one of the 2k registers.
Register Indirect Mode − In this mode, the instruction defines a register in
the CPU whose contents provide the address of the operand in memory. In other
words, the selected register includes the address of the operand rather than the
operand itself.
A reference to the register is then equivalent to specifying a memory address.
The advantage of a register indirect mode instruction is that the address field of

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 4


Micro – computer System Design

the instruction uses fewer bits to select a register than would have been
required to specify a memory address directly.
Autoincrement or Autodecrement Mode &minuend; This is similar to the
register indirect mode except that the register is incremented or decremented
after (or before) its value is used to access memory. When the address stored in
the register defines a table of data in memory, it is necessary to increment or
decrement the register after every access to the table. This can be obtained by
using the increment or decrement instruction.
Direct Address Mode − In this mode, the effective address is equal to the
address part of the instruction. The operand resides in memory and its address
is given directly by the address field of the instruction. In a branch-type
instruction, the address field specifies the actual branch address.
Indirect Address Mode − In this mode, the address field of the instruction
gives the address where the effective address is stored in memory. Control
fetches the instruction from memory and uses its address part to access
memory again to read the effective address.
Indexed Addressing Mode − In this mode, the content of an index register is
added to the address part of the instruction to obtain the effective address. The
index register is a special CPU register that contains an index value. The
address field of the instruction defines the beginning address of a data array in
memory.

Subroutines
A subroutine is a small program written separately from the main program to perform a
particular task that you may repeatedly require in the main program.
a subroutine is a sequence of program instructions that perform a specific
task, packaged as a unit. This unit can then be used in programs wherever
that particular task have to be performed
Subroutines are reusable code blocks that perform specific tasks, while
interrupts allow external events to temporarily halt the main program and
execute a designated routine.

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 5


Micro – computer System Design

Purpose:
Subroutines promote code reuse, modularity, and readability by breaking down
complex programs into smaller, manageable units

The different types of subroutine instructions are


1. Unconditional Call instruction - CALL address is the format for
unconditional call instruction. After execution of this instruction program
control is transferred to a sub-routine whose starting address is specified in
the instruction. Value of PC (Program Counter) is transferred to the memory
stack and value of SP (Stack Pointer) is decremented by
2. Conditional Call instruction - In these instructions program control is
transferred to subroutine and value of PC is pushed into stack only if
condition is satisfied.

Advantages of Subroutine -
1. Decomposing a complex programming task into simpler steps.
2. Reducing duplicate code within a program.
3. Enabling reuse of code across multiple programs.
4. Improving tractability or makes debugging of a program easy.

Interrupts:
In a microprocessor, interrupts are signals that interrupt the normal execution of a
program to handle a specific event or situation. They allow peripheral devices or other
components to request the CPU's attention and execute a corresponding Interrupt
Service Routine (ISR). This ISR is a short program that instructs the microprocessor on
how to handle the interrupt.

An interrupt is a mechanism that allows external events (e.g., hardware signals, timer
expirations) to temporarily halt the current program's execution and switch control to a
dedicated interrupt service routine (ISR).
interrupt is a process in which control of the program transfers from the main
program to the starting location defined by interrupt. It is a process by which
some external device or peripheral informs microprocessor to become ready
for data communication by accepting the made request. Hence, it is a signal

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 6


Micro – computer System Design

that temporarily suspends the normal execution of a program and redirects


the control to a specific interrupt service routine (ISR). Interrupts allow the
microprocessor to respond to external events, such as user input, system
events, or hardware signals without the need for constant polling

Purpose:
Interrupts are essential for handling asynchronous events, allowing the microcomputer
to respond to events in real-time without constantly polling for them.

Types of Interrupt
Software Interrupts
A sort of interrupt called a software interrupt is one that is produced by
software or a system as opposed to hardware. Traps and exceptions are
other names for software interruptions. They serve as a signal for the
operating system or a system service to carry out a certain function or
respond to an error condition. Generally, software interrupts occur as a result
of specific instructions being used or exceptions in the operation

2. Hardware Interrupts
In a hardware interrupt, all the devices are connected to the Interrupt
Request Line. A single request line is used for all the n devices. To request
an interrupt, a device closes its associated switch. When a device requests
an interrupt, the value of INTR is the logical OR of the requests from
individual devices.

Flowchart of Interrupt Handling Mechanism


The Image below depicts the flowchart of interrupt handling mechanism

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 7


Micro – computer System Design

Inter
rupt Handling Mechanism
 Step 1:- Any time that an interrupt is raised, it may either be an I/O
interrupt or a system interrupt.
 Step 2:- The current state comprising registers and the program counter is
then stored in order to conserve the state of the process.
 Step 3:- The current interrupt and its handler is identified through the
interrupt vector table in the processor.
 Step 4:- This control now shifts to the interrupt handler, which is a function
located in the kernel space.
 Step 5:- Specific tasks are performed by Interrupt Service Routine (ISR)
which are essential to manage interrupt.
 Step 6:- The status from the previous session is retrieved so as to build
on the process from that point.
 Step 7:- The control is then shifted back to the other process that was
pending and the normal process continues.

Memory Organization in Computer Architecture


A memory unit is the collection of storage units or devices
together. The memory unit stores the binary information in
the form of bits. Generally, memory/storage is classified into
2 categories:

 Volatile Memory: This loses its data, when power is


switched off.
 Non-Volatile Memory: This is a permanent storage and
does not lose any data when power is switched off.

Memory Hierarchy

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 8


Micro – computer System Design

The total memory capacity of a computer can be visualized


by hierarchy of components. The memory hierarchy system
consists of all storage devices contained in a computer
system from the slow Auxiliary Memory to fast Main Memory
and to smaller Cache memory.

Auxillary memory access time is generally 1000


times that of the main memory, hence it is at the bottom of
the hierarchy.

The main memory occupies the central position because it


is equipped to communicate directly with the CPU and with
auxiliary memory devices through Input/output processor
(I/O).

When the program not residing in main memory is needed by


the CPU, they are brought in from auxiliary memory.
Programs not currently needed in main memory are
transferred into auxiliary memory to provide space in main
memory for other programs that are currently in use.

The cache memory is used to store program data which is


currently being executed in the CPU. Approximate access
time ratio between cache memory and main memory is
about 1 to 7~10

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 9


Micro – computer System Design

Memory Access Methods

Each memory type, is a collection of numerous memory


locations. To access data from any memory, first it must be
located and then the data is read from the memory location.
Following are the methods to access information from
memory locations:

1. Random Access: Main memories are random access


memories, in which each memory location has a unique
address. Using this unique address any memory location
can be reached in the same amount of time in any order.
2. Sequential Access: This methods allows memory
access in a sequence or in order.
3. Direct Access: In this mode, information is stored in
tracks, with each track having a separate read/write
head.

Main Memory

The memory unit that communicates directly within the CPU,


Auxillary memory and Cache memory, is called main
memory. It is the central storage unit of the computer
system. It is a large and fast memory used to store data
during computer operations. Main memory is made up
of RAM and ROM, with RAM integrated circuit chips holing
the major share.

 RAM: Random Access Memory

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 10


Micro – computer System Design

o DRAM: Dynamic RAM, is made of capacitors and


transistors, and must be refreshed every 10~100
ms. It is slower and cheaper than SRAM.
o SRAM: Static RAM, has a six transistor circuit in
each cell and retains data, until powered off.
o NVRAM: Non-Volatile RAM, retains its data, even
when turned off. Example: Flash memory.
 ROM: Read Only Memory, is non-volatile and is more like
a permanent storage for information. It also stores
the bootstrap loader program, to load and start the
operating system when computer is turned
on. PROM(Programmable ROM), EPROM(Erasable
PROM) and EEPROM(Electrically Erasable PROM) are
some commonly used ROMs.

Auxiliary Memory

Devices that provide backup storage are called auxiliary


memory. For example: Magnetic disks and tapes are
commonly used auxiliary devices. Other devices used as
auxiliary memory are magnetic drums, magnetic bubble
memory and optical disks.

It is not directly accessible to the CPU, and is accessed using


the Input/Output channels.

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 11


Micro – computer System Design

Cache Memory

The data or contents of the main memory that are used again
and again by CPU, are stored in the cache memory so that we
can easily access that data in shorter time.

Whenever the CPU needs to access memory, it first checks


the cache memory. If the data is not found in cache memory
then the CPU moves onto the main memory. It also transfers
block of recent data into the cache and keeps on deleting the
old data in cache to accommodate the new one.

Input-Output Interface is used as a method which helps in transferring of


information between the internal storage devices i.e. memory and the
external peripheral device . A peripheral device is that which provide input
and output for the computer, it is also called Input-Output devices. For
Example: A keyboard and mouse provide Input to the computer are called
input devices while a monitor and printer that provide output to the computer
are called output devices. Just like the external hard-drives, there is also
availability of some peripheral devices which are able to provide both input
and output.

In micro-computer base system, the only purpose of peripheral devices is


just to provide special communication links for the interfacing them with
the CPU. To resolve the differences between peripheral devices and CPU,
there is a special need for communication links.

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 12


Micro – computer System Design

Functions of Input-Output Interface:


1. It is used to synchronize the operating speed of CPU with respect to
input-output devices.
2. It selects the input-output device which is appropriate for the interpretation
of the input-output signal.
3. It is capable of providing signals like control and timing signals.
4. In this data buffering can be possible through data bus.
5. There are various error detectors.
6. It converts serial data into parallel data and vice-versa.
7. It also convert digital data into analog signal and vice-versa.

In microcomputer system design, Programmed Input-Output (PIO) is a


method for data transfer between the CPU and peripheral devices, where the
CPU directly controls the data transfer process through program
instructions. The CPU reads or writes data directly to or from the device's
memory-mapped registers, essentially acting as a "programmer" of the data
transfer.
How Programmed I/O works:
1. 1. CPU initiates the transfer:
The CPU executes a set of instructions to control the data transfer.

2. 2. Device ready check:

Before initiating the transfer, the CPU typically checks the device's status to ensure it's ready
for the operation. This involves reading status bits from the device's memory-mapped
registers.

3. 3. Data transfer:

Once the device is ready, the CPU reads data from the device's registers (for input) or writes
data to the device's registers (for output).

4. 4. Data processing:
The CPU processes the data it has received or uses the data it has written to control the
device.
Advantages of Programmed I/O:
 Simplicity: PIO is a straightforward and relatively easy method to implement.

 Direct control: The CPU has direct control over the data transfer process.

 Suitable for slow devices: It's well-suited for slower I/O devices where high data transfer rates
are not a critical requirement, according to Wikipedia.
Disadvantages of Programmed I/O:

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 13


Micro – computer System Design

 CPU overhead:

The CPU is required to actively monitor the device's status and control the data transfer,
which can be time-consuming and consume CPU resources.

 Slower transfer rates:

PIO can be slower compared to DMA (Direct Memory Access) because the CPU is involved in
each data transfer.

 Not ideal for fast devices:


PIO is not suitable for high-speed devices where the CPU's overhead can become a
bottleneck.
In summary:
PIO is a fundamental I/O method in microcomputer systems, offering a simple
and direct way to control data transfer between the CPU and peripheral
devices. While simple and useful for some applications, its limitations in speed
and CPU overhead make it less suitable for high-speed data transfer
scenarios.

In a microcomputer system, the Input-Output Processor (IOP) is a specialized


processor that handles all input and output operations without involving the
main CPU. It acts as an interface between the CPU and various peripheral
devices like keyboards, printers, and network cards. The IOP manages data
transfer, synchronizes with devices, and handles interrupts related to I/O
operations, freeing the CPU for other tasks

What an IOP does:


 Direct Memory Access (DMA):
The IOP can directly access and store data in memory, bypassing the CPU. This
speeds up I/O operations and reduces the CPU's workload.
 I/O Device Control:
The IOP controls the operation of peripheral devices, ensuring they are synchronized
with the CPU's timing.
 Interrupt Handling:
The IOP handles interrupts from I/O devices, signaling when data is ready or an error
has occurred. This allows the CPU to be notified of I/O events without polling.
 Data Conversion:

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 14


Micro – computer System Design

The IOP may also convert data between different formats required by the CPU and the
peripheral device.

 Program Execution:
The IOP can execute a specific set of instructions (commands) related to I/O
transfers. These instructions are often stored in memory and are fetched by the IOP,
not the CPU.
How it works:
1. 1. Initiation:
An I/O operation is initiated by a request from the system or a peripheral device.
2. 2. CPU Involvement (limited):
The CPU might be involved to a limited extent, such as informing the IOP of the
starting address of the I/O program in memory.
3. 3. Data Transfer:
The IOP takes over the data transfer process, using DMA to move data directly
between the I/O device and memory.
4. 4. Interrupts:
Once the data transfer is complete or an error occurs, the IOP generates an interrupt
to inform the CPU.
5. 5. CPU Response:
The CPU then handles the interrupt and takes appropriate action.
Benefits of using an IOP:
 Increased Efficiency:
The IOP frees the CPU from handling I/O operations, allowing the CPU to focus on
other tasks.
 Faster I/O:
Direct Memory Access (DMA) enables faster data transfer between the I/O device and
memory.
 Reduced CPU Overhead:
The CPU is not constantly involved in I/O operations, reducing its workload and
improving performance.
In essence, the IOP acts as a specialized assistant to the CPU, handling the
intricacies of I/O operations while leaving the CPU free to perform its main
computational tasks

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 15


Micro – computer System Design

DMA Controller
Direct Memory Access (DMA) uses hardware for accessing the memory.
This hardware is called a DMA Controller. It has the work of transferring the
data between input, output devices and main memory with very less
interaction with the processor. The Direct Memory Access Controller is a
control unit, which has the work of transferring data.

DMA Controller in Computer Architecture


DMA Controller is a type of control unit that works as an interface for the
data bus and the I/O Devices. As mentioned, DMA Controller has the work of
transferring the data without the intervention of the processors, processors
can control the data transfer. DMA Controller also contains an address unit,
which generates the address and selects an I/O device for the transfer of
data. Below is the block diagram of the DMA Controller.

Working of DMA Controller


The DMA controller registers have three registers as follows.
 Address register: It contains the address to specify the desired location
in memory.
 Word count register: It contains the number of words to be transferred.
 Control register: It specifies the transfer mode.
All registers in the DMA appear to the CPU as I/O interface registers.
Therefore, the CPU can both read and write into the DMA registers under
program control via the data bus.
The unit communicates with the CPU through the data bus and control lines.
Through the use of the address bus and allowing the DMA and RS register
to select inputs, the register within the DMA is chosen by the CPU.

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 16


Micro – computer System Design

RD and WR are two-way inputs. When BG (bus grant) input is 0, the CPU
can communicate with DMA registers. When BG (bus grant) input is 1, the
CPU has relinquished the buses and DMA can communicate directly with the
memory.

Dr. Vidya Pawar,Vedanta Degree College, Raichur Page 17

You might also like