Module 1 Microprocessor
Module 1 Microprocessor
MICROPROCESSOR
6/29/2022 Dr. R. Sumathi, Department of EEE, 1
SKCET
TEXT BOOKS
1. Ramesh S. Gaonkar, ‘Microprocessor Architecture
Programming and Applications with 8085’, Penram Intl.
Publishing, 6th Edition, 2013.
2. Krishna Kant, ‘Microprocessors and Microcontrollers,
Architecture, Programming and System Design - 8085,
8086, 8051, 8096’, Prentice Hall India Ltd Publications,
1st Edition, 2010.
3. Kenneth Ayala, ‘The 8051 Microcontroller’, Cengage
Learning Publications, 2nd Edition, 2008.
4.John.B.Peatman , “ Design with PIC Microcontroller ,
Prentice hall, 2012.Dr. R. Sumathi,SKCET
6/29/2022 Department of EEE, 2
REFERENCE BOOKS
1. Ray A.K., Bhurchandi K.M., ‘Advanced
Microprocessor and Peripherals’, Tata McGraw-Hill
Publications, 3rd Edition, 2013..
2. Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin
McKinlay, ‘The 8051 Microcontroller and Embedded
Systems using Assembly and C’, Prentice Hall
Publications, 2nd Edition, 2008.
3. Krishna Kant, ‘Microprocessor and Microcontrollers’,
Eastern Company Edition, Prentice Hall of India,
New Delhi, 2nd edition,2013.
6/29/2022 Dr. R. Sumathi, Department of EEE, 3
SKCET
8085:
Functional block diagram
Signals
Memory interfacing
I/O ports
Timing Diagram
Interrupt structure
Instruction format and addressing modes
Assembly language format
6/29/2022 Dr. R. Sumathi, Department of EEE, 4
SKCET
8086:
Architecture
Instruction format and addressing
modes
Assembly language format.
Introduction to ARM
6/29/2022 Dr. R. Sumathi, Department of EEE, 5
SKCET
INTRODUCTION
• Language:
1. Low level language
• machine language - The software
developed using 1's and 0's
• assembly language - The software
developed using mnemonics
2. High level language - closer to human
languages
6/29/2022 Dr. R. Sumathi, Department of EEE, 6
SKCET
INTRODUCTION
• Bit – binary digit (0 and 1)
• Nibble – 4 bits
• Byte – 8 bits
• Word – 16 bits
• Double word – 32 bits
• Multiple word – 64, 128, 256….. bits
• Data – Quantity operated by an instruction of a program
• Address – Memory location for the binary information
• Memory word size – Size of the binary information that
can be stored in memory location
6/29/2022 Dr. R. Sumathi, Department of EEE, 7
SKCET
INTRODUCTION
• Microprocessor: It is a program controlled
semiconductor device (IC), which fetches, decodes
and executes instructions.
• It is used as a Central Processing Unit (CPU) of a
computer.
accumulator.
6/29/2022 Dr. R. Sumathi, Department of EEE, 121
SKCET
ADDRESSING MODES
Register Addressing:
• In register addressing mode, the
instruction speci es the name of the
register in which the data is available.
Example:
MOV A, B - Move the content of B
register to A register.
6/29/2022 Dr. R. Sumathi, Department of EEE, 122
SKCET
ADDRESSING MODES
Register Indirect Addressing:
• In register indirect addressing mode, the
instruction speci es the name of the register
in which the address of the data is available.
• Here the data will be in memory and the
address will be in the register pair.
Eg.
MOV A, M - The memory data addressed by
HL pair is moved to A register.
6/29/2022 Dr. R. Sumathi, Department of EEE, 123
SKCET
ADDRESSING MODES
Implied Addressing:
• In implied addressing mode, the
instruction itself speci es the data to
be operated.
Example:
CMA - Complement the content of
accumulator.
6/29/2022 Dr. R. Sumathi, Department of EEE, 124
SKCET
ASSEMBLY
LANGUAGE
PROGRAMMING
6/29/2022 Dr. R. Sumathi, Department of EEE, 125
SKCET
ASSEMBLY LANGUAGE PROGRAMMING
ASSEMBLER:
• An ASSEMBLER is a program, which is
used to translate assembly language
program to correct binary code for each
instruction.
6/29/2022 Dr. R. Sumathi, Department of EEE, 126
SKCET
ASSEMBLY LANGUAGE PROGRAMMING
Flow chart:
• It is a graphical representation of the operation ow
of the program.
• It is a graphical form of algorithm.
• Symbols used for ow chart are,
machine cycle.
• If there is any interrupt it accept the interrupt and
send the INTA (active low) signal to the peripheral.
6/29/2022 Dr. R. Sumathi, Department of EEE, 144
SKCET
INTERRUPTS
• The vectored address of particular interrupt is
stored in program counter.
• The processor executes an interrupt service
routine (ISR) addressed in program counter.
• It returned to main program by RET instruction.
Types of Interrupts:
It supports two types of interrupts.
1. Hardware
2. Software
6/29/2022 Dr. R. Sumathi, Department of EEE,
145
SKCET
INTERRUPTS
Software interrupts:
• The software interrupts are program instructions.
These instructions are inserted at desired
locations in a program.
• The 8085 has eight software interrupts from RST
0 to RST 7. The vector address for these
interrupts can be calculated as follows.
Interrupt number * 8 = Vector address
For RST 5, 5 x 8 = 40 = 28 H
16
• In this system the entire 16 address lines of the processor are connected to address
input pins of memory IC in order to address the internal locations of memory.
• The chip select (CS) pin of EPROM is permanently tied to logic low (i.e., tied to ground).
• Since the processor is connected to EPROM, the active low RD pin is connected to
active low output enable pin of EPROM.
– The range of address for EPROM is 0000H to FFFFH.
O – Over ow ag
D – Direction ag
I – Interrupt ag
T - Trap ag
S – Sign ag
Z – Zero ag
AC – Auxiliary carry ag
P – Parity ag
CY – Carry ag
6/29/2022 Dr. R. Sumathi, Department of EEE, 192
SKCET
Execution Unit (EU)
The ags are divided into two classi cations. They
are,
1. Condition code Flags:
These ags re ect the result of Operations
Performed by ALU. They are,
Over ow ag (O): This ag is set, if an over ow
occurs during the arithmetic operation of two
signed numbers.
Sign ag (S): This ag is set, if an MSB of the
accumulator
6/29/2022
is set after any computation.
Dr. R. Sumathi, Department of EEE, 193
SKCET
Execution Unit (EU)
Sign ag (S): This ag is set, if an MSB of the
accumulator is set after any computation.
Zero ag (Z): This ag is set, if the result of any
computation is zero.
Auxiliary carry ag (AC): This ag is set, if there is a carry
from the third bit, during addition or borrow.
Parity ag (P): The ag is set, if the lower byte result
contains even number of 1’s.
Carry ag (CY): This ag is set, if any computation result
contains a carry.
6/29/2022 Dr. R. Sumathi, Department of EEE, 194
SKCET
Execution Unit (EU)
2. Machine control ags:
Direction Flag: This ag is set, if the string is processed
from higher address towards lower address. Otherwise,
the ag is reset. This is used only in string manipulation
instructions.
Interrupt ag: This ag is set, only when maskable
interrupts are recognized.
Trap ag: When a trap interrupt is received by the
processor, this ag is set, which indicates, the processor
to execute the current instruction and to transfer the
control
6/29/2022 to trap service
Dr. R.routine. In Other
Sumathi, Department
SKCET
of EEE, words, When 195
PINS AND SIGNALS OF 8086
DAA
AAA
AAS
DAS
AAM
After multiplication
AAD
Before division
(Near call-
within the
segment)
(Far call-
another segment)