Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

MUTHAYAMMAL COLLEGE OF ARTS & SCIENCE (AUTONOMOUS)

DEPARTMENT OF PHYSICS

Staff Name: P.THAMIZHARASU, M.Sc.,M.Phil.,(Ph.D) Class: III B.Sc A Paper Code:19UPHS06

Paper Name: MICROPROCESSOR AND ITS APPLICATIONS Unit: I

TERMS RELATED MICROPROCESSOR:


Bit:
A bit is just a smaller unit of information than a byte. It reflects the basic logical process of a
transistor: a single unit of information reflecting a zero (no charge) or a one (a completed,
charged circuit). There are eight bits in one byte of information.
Byte:
A byte represents eight bits, and is the most commonly used term relating to the amount of
information stored within a computer’s memory.
Nibble:
Alternatively referred to as a nyble or nybble, a nibble is four bits or half of a byte. For
example, the decimal value of 10 in an 8-bit byte is 00001010 that same value in a 4-bit nibble
is 1010.
Bus:
A bus is a high-speed internal connection. Buses are used to send control signals and data
between the processor and other components. Three types of bus are used. Address bus -
carries memory addresses from the processor to other components such as primary storage
and input/output devices
Mnemonic :
A mnemonic in the microprocessor is either a symbol, a name or a term that defines a
computer function or operation. A mnemonic is always used to give users quick access to
computer functions, processes or services. Through mnemonics, a user will bypass the actual
and long ways or path to perform a task.
Instruction:
An instruction is a binary pattern designed inside a microprocessor to perform a specific
function. The entire group of instructions that a microprocessor supports is called Instruction
Set.
1
MSB & LSB:
In a binary number, the bit furthest to the left is called the most significant bit (msb) and the
bit furthest to the right is called the least significant bit (lsb). The remaining bits hold the
magnitude of the number.
Machine language and assembly language :
Machine language and assembly language are both low-level languages, but machine code is
below assembly in the hierarchy of computer languages.
Assembly language includes human-readable commands, such as mov, add, and sub, while
machine language does not contain any words or even letters.
Some developers manually write assembly language to optimize a program, but they do not
write machine code. Only developers who write software compilers need to worry about
machine language.
Word:
A "word" in processor terms is the natural size of data it is designed to work with.
Common word lengths for modern processors are multiples of 8 bits like a 32 bit or 64 bit
word but other designs have used odd word sizes like 18 bits or 60 bits.
Microcomputer:
A microcomputer is a complete computer on a smaller scale and is generally a synonym for
the more common term, personal computer or PC , a computer designed for an individual.
A microcomputer contains a microprocessor (a central processing unit on
microchip ), memory in the form of read-only memory and random access memory , I/O ports
and a bus or system of interconnecting wires, housed in a unit that is usually called
a motherboard .In an ascending hierarchy of general computer sizes
An embedded systems programming computer, which is embedded in something and doesn't
support direct human interaction but nevertheless meets all the other criteria of a
microcomputer. Microcomputer workstation , as used to mean a more powerful personal
computer for special applications minicomputer , now restyled a "mid-range
server"mainframe or mainframe computer, which is now usually referred to by its
manufacturers as a "large server"Supercomputer, formerly almost a synonym for "Cray
supercomputer" but now meaning a very large server and sometimes including a system of
computers using parallel processing. A parallel processing system is a system of

2
interconnected computers that work on the same application together, sharing tasks that can
be performed concurrently.
Microprocessor:
A microprocessor is a controlling unit of a micro-computer, fabricated on a small chip
capable of performing Arithmetic Logical Unit (ALU) operations and communicating with the
other devices connected to it.
In this tutorial, we will discuss the architecture, pin diagram and other key concepts of
microprocessors.
Microprocessor is a controlling unit of a micro-computer, fabricated on a small chip capable of
performing ALU (Arithmetic Logical Unit) operations and communicating with the other
devices connected to it.
Microprocessor consists of an ALU, register array, and a control unit. ALU performs
arithmetical and logical operations on the data received from the memory or an input device.
Register array consists of registers identified by letters like B, C, D, E, H, L and accumulator.
The control unit controls the flow of data and instructions within the computer.

Block Diagram of a Basic Microcomputer:

How does a Microprocessor Work?


The microprocessor follows a sequence: Fetch, Decode, and then Execute.
Initially, the instructions are stored in the memory in a sequential order. The microprocessor
fetches those instructions from the memory, then decodes it and executes those instructions
till STOP instruction is reached. Later, it sends the result in binary to the output port. Between
these processes, the register stores the temporarily data and ALU performs the computing
functions.
List of Terms Used in a Microprocessor:

3
Here is a list of some of the frequently used terms in a microprocessor −
Instruction Set − It is the set of instructions that the microprocessor can understand.
Bandwidth − It is the number of bits processed in a single instruction.
Clock Speed − It determines the number of operations per second the processor can perform.
It is expressed in megahertz (MHz) or gigahertz (GHz).It is also known as Clock Rate.
Word Length − It depends upon the width of internal data bus, registers, ALU, etc. An 8-bit
microprocessor can process 8-bit data at a time. The word length ranges from 4 bits to 64 bits
depending upon the type of the microcomputer.
Data Types − The microprocessor has multiple data type formats like binary, BCD, ASCII,
signed and unsigned numbers.
Development of Microprocessor:
4-bit Microprocessors
The first microprocessor was introduced in 1971 by Intel Corp. It was named Intel 4004 as
it was a 4 bit processor. It was a processor on a single chip. It could perform simple arithmetic
and logic operations such as addition, subtraction, boolean AND and boolean OR. It had a
control unit capable of performing control functions like fetching an instruction from memory,
decoding it, and generating control pulses to execute it. It was able to operate on 4 bits of data
at a time. This first microprocessor was quite a success in industry. Soon other
microprocessors were also introduced. Intel introduced the enhanced version of 4004, the
4040. Some other 4 bit processors are International’s PPS4 and Thoshiba’s T3472.
8-bit Microprocessors:
The first 8 bit microprocessor which could perform arithmetic and logic operations on 8 bit
words was introduced in 1973 again by Intel. This was Intel 8008 and was later followed by an
improved version, Intel 8088. Some other 8 bit processors are Zilog-80 and Motorola M6800.
16-bit Microprocessors:
The 8-bit processors were followed by 16 bit processors. They are Intel 8086 and 80286.
32-bit Microprocessors:
The 32 bit microprocessors were introduced by several companies but the most popular one
is Intel 80386.
Pentium Series:
Instead of 80586, Intel came out with a new processor namely Pentium processor. Its
performance is closer to RISC performance. Pentium was followed by Pentium Pro CPU.
Pentium Pro allows allow multiple CPUs in a single system in order to achive multiprocessing.

4
The MMX extension was added to Pentium Pro and the result was Pentiuum II. The low cost
version of Pentium II is celeron.
The Pentium III provided high performance floating point operations for certain types of
computations by using the SIMD extensions to the instruction set. These new instructions
makes the Pentium III faster than high-end RISC CPUs.
Interestingly Pentium IV could not execute code faster than the Pentium III when running at
the same clock frequency. So Pentium IV had to speed up by executing at a much higher clock
frequency.
Pin Diagram of 8085 Microprocessor :

The pins of a 8085 microprocessor can be classified into seven groups −


Address bus:
A15-A8, it carries the most significant 8-bits of memory/IO address.
Data bus:
AD7-AD0, it carries the least significant 8-bit address and data bus.
Control and status signals:
These signals are used to identify the nature of operation. There are 3 control signal and 3
status signals.
Three control signals are RD, WR & ALE.
RD − This signal indicates that the selected IO or memory device is to be read and is ready for
accepting data available on the data bus.

5
WR − This signal indicates that the data on the data bus is to be written into a selected
memory or IO location.
ALE − It is a positive going pulse generated when a new operation is started by the
microprocessor. When the pulse goes high, it indicates address. When the pulse goes down it
indicates data.
Three status signals are IO/M, S0 & S1.
IO/M:
This signal is used to differentiate between IO and Memory operations, i.e. when it is high
indicates IO operation and when it is low then it indicates memory operation.
S1 & S0:
These signals are used to identify the type of current operation.
Power supply:
There are 2 power supply signals − VCC & VSS. VCC indicates +5v power supply and VSS
indicates ground signal.
Clock signals:
There are 3 clock signals, i.e. X1, X2, CLK OUT.
X1, X2 − A crystal (RC, LC N/W) is connected at these two pins and is used to set frequency of
the internal clock generator. This frequency is internally divided by 2.
CLK OUT − This signal is used as the system clock for devices connected with the
microprocessor.
Interrupts & externally initiated signals
Interrupts are the signals generated by external devices to request the microprocessor to
perform a task. There are 5 interrupt signals, i.e. TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR.
We will discuss interrupts in detail in interrupts section.
INTA − It is an interrupt acknowledgment signal.
RESET IN − This signal is used to reset the microprocessor by setting the program counter to
zero.
RESET OUT − This signal is used to reset all the connected devices when the microprocessor is
reset.
READY − This signal indicates that the device is ready to send or receive data. If READY is low,
then the CPU has to wait for READY to go high.
HOLD − This signal indicates that another master is requesting the use of the address and data
buses.

6
HLDA (HOLD Acknowledge) − It indicates that the CPU has received the HOLD request and it
will relinquish the bus in the next clock cycle. HLDA is set to low after the HOLD signal is
removed.
Serial I/O signals:
There are 2 serial signals, i.e. SID and SOD and these signals are used for serial
communication.
SOD (Serial output data line) − The output SOD is set/reset as speci ied by the SIM instruction.
SID (Serial input data line) − The data on this line is loaded into accumulator whenever a RIM
instruction is executed.
8085 microprocessor
8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor
designed by Intel in 1977 using NMOS technology.
It has the following configuration −
8-bit data bus
16-bit address bus, which can address upto 64KB
A 16-bit program counter
A 16-bit stack pointer
Six 8-bit registers arranged in pairs: BC, DE, HL
Requires +5V supply to operate at 3.2 MHZ single phase clock
It is used in washing machines, microwave ovens, mobile phones, etc.
8085 Microprocessor – Functional Units:

Accumulator
It is an 8-bit register used to perform arithmetic, logical, I/O & LOAD/STORE operations. It is
connected to internal data bus & ALU.
Arithmetic and logic unit
As the name suggests, it performs arithmetic and logical operations like Addition,
Subtraction, AND, OR, etc. on 8-bit data.
General purpose register
There are 6 general purpose registers in 8085 processor, i.e. B, C, D, E, H & L. Each register
can hold 8-bit data.
These registers can work in pair to hold 16-bit data and their pairing combination is like B-C,
D-E & H-L.

7
Program counter
It is a 16-bit register used to store the memory address location of the next instruction to be
executed. Microprocessor increments the program whenever an instruction is being executed,
so that the program counter points to the memory address of the next instruction that is going
to be executed.
Stack pointer
It is also a 16-bit register works like stack, which is always incremented/decremented by 2
during push & pop operations.
Temporary register
It is an 8-bit register, which holds the temporary data of arithmetic and logical operations.
Flag register
It is an 8-bit register having five 1-bit flip-flops, which holds either 0 or 1 depending upon the
result stored in the accumulator.
These are the set of 5 flip-flops −
Sign (S)
Zero (Z)
Auxiliary Carry (AC)
Parity (P)
Carry (C)
Its bit position is shown in the following table −

D7 D6 D5 D4 D3 D2 D1 D0

S Z AC P CY

Instruction register and decoder


It is an 8-bit register. When an instruction is fetched from memory then it is stored in the
Instruction register. Instruction decoder decodes the information present in the Instruction
register.
Timing and control unit
It provides timing and control signal to the microprocessor to perform operations. Following
are the timing and control signals, which control external and internal circuits −
Control Signals: READY, RD’, WR’, ALE
Status Signals: S0, S1, IO/M’
DMA Signals: HOLD, HLDA
8
RESET Signals: RESET IN, RESET OUT
Interrupt control
As the name suggests it controls the interrupts during a process. When a microprocessor is
executing a main program and whenever an interrupt occurs, the microprocessor shifts the
control from the main program to process the incoming request. After the request is
completed, the control goes back to the main program.
There are 5 interrupt signals in 8085 microprocessor: INTR, RST 7.5, RST 6.5, RST 5.5, TRAP.
Serial Input/output control
It controls the serial data communication by using these two instructions: SID (Serial input
data) and SOD (Serial output data).
Address buffer and address-data buffer
The content stored in the stack pointer and program counter is loaded into the address buffer
and address-data buffer to communicate with the CPU. The memory and I/O chips are
connected to these buses; the CPU can exchange the desired data with the memory and I/O
chips.
Address bus and data bus
Data bus carries the data to be stored. It is bidirectional, whereas address bus carries the
location to where it should be stored and it is unidirectional. It is used to transfer the data &
Address I/O devices.
Registers used in 8085 Microprocessor and their details Registers:
(1) Simple register (main register)
(2) General purpose register
(3) Special function register
(4) Other register

1)Simple registers
a) Accumulator :
(A) 8 bit
(B) Used as a register for storing one data when two are arithmetically and logically
operated .
(C) after ALU operation result is also stored in accumulator.
(D) when single no is to be logically operated only accumulator is used as a storage as well as

9
storing result after execution.
2) General purpose register-
(A) B,C,D,E,H &L are used as general purpose register.
(B) Each 8 bit long .
(C) Pairing can also be done in a standard way to stored 16 bit data
eg (B-C, D-E, H-L)
(D) H-L pair is an exceptional pair which is used as a memory pointer to locate an address L
XH 2000H.
H recognize H-L pair of general purpose register:
Load 16 bit data immediately in H-L pair it means 2000H is the location of memory where
data is stored and it is recall by an instruction MOV A M
M locates memory location 2000H which is pointed bye H-L pair.
Exceptional point in 8085 microprocessor 16 bit additional can only be possible by using an
instruction DAD.
3) Special function register-
stack pointer & program counter are two special function register these are those register
which are used only by microprocessor not by user.
a) Program counter-
(1) it is a 16 bit register
(2)Used by microprocessor
(3)It holds the address of next instruction to be executed for eg- after execution MOV A,B
instruction program counter will be automatically incremented and points next location of
memory where another data to stored.
b) Stack pointer- It is used when interrupt is generated by microprocessor interrupt is a
command which stop the main program counter location will be stored in a stack and program
counter will be loaded with a new address through which sub routine is called.
Sub routine is a small program which is used many times by main program. For example-
Generating delay in main program after execution of each instruction.
c) Stack Small memory location acquired by main program in RAM area.
4) Other Registers-
1) Instruction Registers
2) Temporary Register

10
a) Instruction Registers-
1) 8 Bit long
2) It will store opcode (8 Bit) of an instruction.
b) Temporary register-
1) 8 Bit long
2) It will store the data temporary before execution of instruction.
Instruction decoder-
Bits generated by instruction registers will be decoded by instruction decode, It means digital
signal will be converted in analog signals and these signals will be send to timing and controll
unit.
Timing and Control Unit-
Signals generated by instruction decoder will be provided by control by way using this unit.
For example-RD, WR, SID, SOD.
SID & SOD are known as Serial In data and Serial out Data.
For example- Copy data from pen drive to microprocessor and vice versa.
Address/Data Bus Buffer (AD0 to AD7)-
1) 8 bit bidirectional.
2) Address as well as data on the same bus.
3) Both data and address will be differentiating by clock cycle generated by timing and control
unit.
4) First clock cycle will be loaded lower 8 bit address on the bus.
5) Two more clock cycle will load the data on address bus.
Address Bus buffer( A8 to A15)-
Higher order address bus unidirectional. Address latch 74373 will be used as temporary
storage for lower bit of address. If address latch is high than address is high and vice versa.
8085 AH1 microprocessor is only microprocessor which operates at 6MHz frequency because
of HMOS technology.
Interrupt signals:
Interrupts are the signals generated by the external devices to request the microprocessor
to perform a task. There are 5 interrupt signals, i.e. TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR.
Interrupt are classified into following groups based on their parameter −
Vector interrupt − In this type of interrupt, the interrupt address is known to the
processor. For example: RST7.5, RST6.5, RST5.5, TRAP.

11
Non-Vector interrupt − In this type of interrupt, the interrupt address is not known to the
processor so, the interrupt address needs to be sent externally by the device to perform
interrupts. For example: INTR.
Maskable interrupt − In this type of interrupt, we can disable the interrupt by writing some
instructions into the program. For example: RST7.5, RST6.5, RST5.5.
Non-Maskable interrupt − In this type of interrupt, we cannot disable the interrupt by writing
some instructions into the program. For example: TRAP.
Software interrupt − In this type of interrupt, the programmer has to add the instructions into
the program to execute the interrupt. There are 8 software interrupts in 8085, i.e. RST0, RST1,
RST2, RST3, RST4, RST5, RST6, and RST7.
Hardware interrupt − There are 5 interrupt pins in 8085 used as hardware interrupts, i.e.
TRAP, RST7.5, RST6.5, RST5.5, INTA.
Clock signal:
We can define a clock signal as a particular type of signal that oscillates between a high and a
low state.
The signal acts like a metronome, which the digital circuit follows in time to coordinate its
sequence of actions.
Digital circuits rely on clock signals to know when and how to execute the functions that are
programmed. If the clock in a design is like the heart of an animal, then clock signals are the
heartbeats that keep the system in motion.
Clock signals produced:
There are different ways a clock signal can to be produced, but they all start off with the
crystal resonator.
A crystal resonator is commonly referred to as a crystal. In order to operate, crystals are
combined with an amplifier circuit to apply voltage to an electrode near or on the crystal.
The quartz crystal is a tiny slit of quartz with each of the two surfaces metalized and attached
with an electrical connection. It’s important the physical size and shape of the quartz crystal
are precisely cut because this determines the frequency of oscillations produced from the
crystal. Once the crystal is cut and shaped, it cannot be used at any other frequency.
Quartz crystals are more commonly used since the frequency generated from quartz crystals
are more resistant to changes in temperature.
If an internal RC resonator was used instead, changes in temperature would affect the
behavior of the oscillator, leading to changes in the output frequency.

12
Hand shake Signals:
Handshaking is a I/O control method to synchronize I/O devices with the microprocessor. As
many I/O devices accepts or release information at a much slower rate than the
microprocessor, this method is used to control the microprocessor to work with a I/O device
at the I/O devices data transfer rate.
Example:
Supposing that we have a printer connected to a system. The printer can print 100
characters/second, but the microprocessor can send much more information to the printer at
the same time. That’s why, just when the printer gets it enough data to print it places a logic 1
signal at its Busy pin, indicating that it is busy in printing. The microprocessor now tests the
busy bit to decide if the printer is busy or not. When the printer will become free it will change
the busy bit and the microprocessor will again send enough amounts of data to be printed.
This process of interrogating the printer is called handshaking.

13

You might also like