0% found this document useful (0 votes)
8 views

MC

The document provides an overview of microprocessor-based systems, detailing the definitions and functions of computers, microprocessors, and microcontrollers. It explains the architecture and organization of computers, as well as various data transfer techniques like programmed I/O and interrupt-driven I/O. Additionally, it compares RISC and CISC architectures, outlines important vocabulary, and describes the role of stacks and stack pointers in programming.
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
0% found this document useful (0 votes)
8 views

MC

The document provides an overview of microprocessor-based systems, detailing the definitions and functions of computers, microprocessors, and microcontrollers. It explains the architecture and organization of computers, as well as various data transfer techniques like programmed I/O and interrupt-driven I/O. Additionally, it compares RISC and CISC architectures, outlines important vocabulary, and describes the role of stacks and stack pointers in programming.
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/ 9

Module 1: Overview of

Microprocessor based system


Computer
Computer: A computer is a programmable machine that receives input, stores and manipulates
data/information, and provides output in a useful format. Basic computer system consist of a CPU,
memory and I/O unit.

Types of computer
1. Main frame
Largest and most powerful computer may need entire room design to work at very high
speed with lager data. Typically 64 bits. Used in military defense control
2. Mini computer
Scale down version of main frame computer are called minicomputer. Usually get fit into a
single rack as a box, runs very slowly and works directly with smallest data words. Used for
business data processing, industrial control.
3. Micro computer
As the name implies microcomputer are small computers. They range from small controllers
that work directly with 4 bit words. And can address 1000 bites of memory one distinguish
feature is CPU is usually a single integrated circuit called micro processor

Definition of the Microprocessor


Microprocessor is a Programmable, Clock driven, Register based, Electronic device that reads
instruction from a storage device, takes the data from input unit and process the data according to
the instructions and provides the result to the output unit.

 Programmable- Perform Different set operation on the data depending on the sequence of
instructions supplied by the programmer.
 Clock Driven – Whole task is divided into basic operations, are Divided into precise system
clock periods.
 Register Based – Storage element

Basic Concepts of Microprocessors


Microcomputer: - It is a programmable machine. The two principal characteristics of a computer are:

 Responds to a specific set of instructions in a well-defined manner.


 It can execute a prerecorded list of instructions (a program)
 Its main components are
1. CPU
2. Input & Output devices
3. Memory

Microprocessor: - It is a programmable VLSI chip which includes ALU, register circuits & control
circuits. Its main unit’s are-

 ALU

 Registers
 Control Unit

Microcontroller: - Silicon chip which includes microprocessor, memory & I/O in a single package

Microprocessor Based System with bus Architecture


ALU: - Arithmetic and logical operations like add, subtraction, AND & OR.

Register Array: - Store data during the execution of program.


Control Unit: Provides necessary timing & control signal. It controls the flow of data between
microprocessor and peripherals.

Memory:

 Stores information such as instructions and data in binary format (0 and 1).
 Sub-system” of microprocessor-based system. sub-system includes the registers

Inside the microprocessor.

1. Read Only Memory (ROM): used to store programs that do not need alterations.
2. Random Access Memory (RAM) (R/WM): used to store programs that can read and altered
like programs and data.

Input/output: Communicates with the outside world.

System Bus: Communication path between the microprocessor and peripherals. Group of wires to
carry bits.

How does a Microprocessor works


 To execute a program, the microprocessor “fetch” each instruction from memory,
“interprets” it, then “executes or perform” it.
 The right name for the cycle is
 Fetch
 Decode
 Execute
 This sequence is Continued until All instructions Are performed.

Structural Overview of a Computer


 Computer structure is the way that each component is arranged so that communication is
possible.
 It is made up of three main components
1. Central Procession Unit (CPU)
2. Memory
3. Input/output
 These three units are connected with help of system interconnection i.e. buses
 Memory is used to store code (programs) and data.
 It can be various kinds of like semiconductor memory using ICs, magnetic memory or optical
memory
 I/O devices are used to accept an input or give an output by the CPU.
 There are various input devices like keyboard, mouse, scanner; and various output devices like
CRT, printer etc.
 CPU is further divided into three units
1. Arithmetic & Logic Unit (ALU)
2. Control Unit (CU)
3. CPU Registers
 ALU is used to perform arithmetic operations like addition, subtraction and logical operation like
AND, OR etc.
 CPU Registers are used to store the data temporarily in the CPU to save memory access time
 Control Unit is divided into three parts
1. Control Memory
2. Control Unit Registers and Decoders
3. Sequencing Logic
 The control memory stores the microinstructions and loads it into the control unit register
 The Sequencing Logic gives these signals in a proper sequence to execute a instruction

Overview of Microprocessor based system


Computer Architecture Computer Organization
Computer Architecture is concerned with the Computer Organization is concerned with the
way hardware components are connected structure and behavior of a computer system as
together to form a computer system. seen by the user.
It acts as the interface between hardware and It deals with the components of a connection in
software. a system.
Computer Architecture helps us to understand Computer Organization tells us how exactly all
the functionalities of a system. the units in the system are arranged and
Interconnected.
A programmer can view architecture in terms Whereas organization expresses the realization
of instructions, addressing modes and registers. of Architecture
While designing a computer system An organization is done on the basis of
architecture is considered first Architecture
Computer Architecture deals with high-level Computer organization deals with low-level
design issues. design issues
Architecture involves logic (instruction sets, Organization involves physical components
addressing modes, data types, cache (circuit design, adders, signal, peripheral)
optimization)
Sub routine
In computer programming a sub routine is a sequence of program instructions that performs a
specific task packed as a unit. This unit then can be used in programs whenever that patiaclur Trask
should be perform sub routine may be defined within the program or separately in the libraries

Stack & Stack Pointer


 A stack is one of the most commonly used data structure.
 A stack, also called Last in First out (LIFO) system, is a linear list in which insertion and deletion
can take place only at one end, called top.
 This structure operates in much the same way as stack of trays.
 If we want to remove a tray from stack of trays it can only be removed from the top only.
 The insertion and deletion operation in stack terminology are known as PUSH and POP
operations.

Following operation can be performed on stack:

1. Create stack (s): To create an empty stack s.


2. PUSH (s, i): To push an element i into stack s.
3. POP (s): To access and remove the top element of the stack s.
4. Peek (s): To access the top element of stack s without removing it from the stack s.
5. Overflow: To check whether the stack is full.
6. Underflow : To check whether the stack is empty

Applications of Stacks are: -

 Stacks can be used for expression evaluation.


 Stacks can be used to check parenthesis matching in an expression.
 Stacks can be used for Conversion from one form of expression to another.
 Stacks can be used for Memory Management.
 Stack data structures are used in backtracking problems.

Stack Pointer

 It is used as a memory pointer.


 It points to a memory location in read/write memory, called the stack.
 It is always incremented / decremented by 2 during push and pop operation.
 A stack pointer is a small register that stores the address of the last program request in a
stack.
 A stack is a specialized buffer which stores data from the top down.
 As new requests come in, they "push down" the older ones.

Direct Memory Access


 DMA stands for Direct Memory Access.
 The I/O module can directly access (read or write) the memory using this method.
 Interrupt driven and programmed I/O require active operation of the CPU, hence transfer
rate is limited and CPU is also busy doing the transfer operation. DMA is the solution for
these problems.
 DMA controller takes over the control of the bus from CPU for I/O transfer.
 The internal block diagram of a DMA controller of the I/O module for DMA method of I/O
interfacing
1. The first information is whether the data has to be read from memory or the data has to be
written to the memory.

• It passes this information via read or writes control lines that are between the processor and
DMA controllers control logic unit.

2. The processor also provides the starting address of/ for the data block in the memory, from
where the data block in memory has to be read or where the data block has to be written in
memory.
• DMA controller stores this in its address register. It is also called the starting address
register.
3. The processor also sends the word count, i.e. how many words are to be read or written.
• It stores this information in the data count or the word count register.
4. The most important is the address of I/O device that wants to read or write data. This
information is stored in the data register.

Data Transfer Techniques: Programmed I/O


Data transfer between CPU and the I/O devices may be done in any of the three possible ways:

1. Programmed I/O
• In the programmed I/O method of interfacing, CPU has direct control over I/O

• The processor checks the status of the issues read or write commands and then transfers data.

• During the data transfer, CPU waits for 1/0 module to complete operation and hence this system
wastes the CPU time.

1. CPU requests for I/O operation.


2. I/O module performs the said operation.
3. I/O module updates the status bits.
4. CPU checks these status bits periodically. Neither the I/O module cannot inform CPU directly nor
can I/O module interrupt CPU.
5. CPU may wait for the operation to complete or may continue the operation later

Data Transfer Techniques: Interrupt Driven I/O


 Interrupt Driven I/O overcomes the disadvantage of programmed I/O i.e. the CPU waiting for I/O
device.
 This disadvantage is overcome by CPU not repeatedly checking for the device being ready or not
instead the I/O module interrupts when ready.

The sequence of operations for interrupt Driven I/O is as below:

1. CPU issues the read command to I/O device.


2. I/O module gets data from peripheral while CPU does other work.
3. Once the I/0 module completes the data transfer from I/O device, it interrupts CPU.
4. On getting the interrupt, CPU requests data from the I/O module.
5. 1/0 module transfers the data to CPU.

Step taken by process to fetch and execute an instruction from the


memory
feteh
instruction

update
decode
register file &
instruction
pc

access
alu opeation
memory
Von Neumann & Harvard Architecture
Von Neumann Architecture Harvard Architecture

It is ancient computer Architecture based on It is modern computer Architecture based on


stored program computer concept Harvard mark I relay based model
Same physical memory address is used for Separate physical memory address is used for
instructions and data instructions and data
There is common bus for data and instruction Separate buses are used for transferring data
transfer and instruction
Two clock cycles are required to execute single An instruction is executed in a single cycle
instruction
It is cheaper is cost It is costly than von neumann
CPU cannot access instructions and read/write CPU can access instructions and read/write a
at the same time same time
It is used in personal computers and small It is used in micro controllers and signal
computers. processing

RISC vs CISC
RISC CISC
It is a Reduced Instruction Set Computer. It is a Complex Instruction Set Computer.
It emphasizes on software to optimize the It emphasizes on hardware to optimize the
instruction set. instruction set.

It is a hard wired unit of programming in the Microprogramming unit in CISC Processor.


RISC Processor.

It requires multiple register sets to store the It requires a single register set to store the
instruction. instruction.
RISC has simple decoding of instruction. CISC has complex decoding of instruction.

Uses of the pipeline are simple in RISC. Uses of the pipeline are difficult in CISC.

It uses a limited number of instruction that It uses a large number of instruction that
requires less time to execute the instructions. requires more time to execute the instructions.

It uses LOAD and STORE that are independent It uses LOAD and STORE instruction in the
instructions in the register-to-register a instructions in the memory-to-memory
program’s interaction interaction of a program.
RISC has more transistors on memory registers. CISC has transistors to store complex
instructions.
The execution time of RISC is very short. The execution time of CISC is longer.

RISC architecture can be used with high-end CISC architecture can be used with low- end
applications like telecommunication, image applications like home automation, security
processing, video processing, etc. system, etc.

It has fixed format instruction. It has variable format instruction.

The program written for RISC architecture Program written for CISC architecture tends to
needs to take more space in memory. take less space in memory.
Example of RISC: ARM, PA-RISC, Power
Architecture, Alpha, AVR, ARC and the SPARC. Examples of CISC: VAX, Motorola 68000 family,
System/360, AMD and the Intel x86 CPUs.

Important vocabulary
 opcode (operation code) - It's a binary code that indicates operations to be
performed.
 Operands - The data on which operations to be performed. (As well as result
of an operation).
 Instruction - Combination of opcode and operand that can be used to instruct
a system is called instruction.
 Instruction set - A list of all the instructions that can be issued to a system is
called instruction set of that system.
 Program / Subroutine / routine - A set of instructions written in a particular
sequence so as to implement a given task.
 Bus - A group of lines, pins or signals having common function is termed as
bus. Data bus to carry data. Address bus to select memory and I/p o/p
locations. Control bus to issue and receive control signals.
 Subroutine - In computer programming, a sequence of instructions that
perform a specific task. A subroutine is a block of instructions that are packed
together as a unit and can then be used in a program whenever that particular
task should be performed. Subroutines may be defined within the main
program or separately in libraries.
 Program Counter (PC) - A register (PU register) which has the address of
the instruction to be executed next in a computer processor. It is also known
as instruction counter, instruction pointer, instruction address register or
sequence control register.
 Stack - A data structure used to store a collection of objects. Data can be
added (objects can be stored) due to a push operation and objects can be
retrieved using a pop operation. When an object is added to the stack, it is
placed on the top of the stack. It can then be removed from the top of the
stack. If a stack is full and an attempt is made to push data onto the stack, it
will cause a stack overflow.

You might also like