Microprocessors
COURSE PCC-EE 503
NIRMAL MURMU
DEPARTMENT OF APPLIED PHYSICS
UNIVERSITY OF CALCUTTA
DEPARTMENT OF APPLIED PHYSICS, UNIVERSITY OF CALCUTTA
Course Outcomes
At the end of this course, students will demonstrate the ability
to,
CO1: Understand the basic concept and architecture of Microprocessors.
CO2: Do assembly language programming with clear understanding of
algorithms.
CO3: Develop knowledge of interfacing of peripherals like I/O, A/D, D/A,
timer etc.
CO4: Develop systems using microprocessor and understand
microcontroller.
DEPARTMENT OF APPLIED PHYSICS, UNIVERSITY OF CALCUTTA
Syllabus
Module 1: 8085 Microprocessor Architecture (8 Hours)
Microprocessor Architecture-8085 microprocessor CPU architecture, pin diagram,
temporary registers, ALU, timing and control unit, machine cycles, bus interfacing,
memory maps, special function registers, stack memory.
Module 2: Data transfer techniques (4 Hours)
Data transfer techniques: Programmed data transfer, concept of interrupt,
Interrupts of 8085, interrupt priority, interrupt driven data transfer, 8259
programmable interrupt controller, DMA transfer, 8257 DMA controller.
Module 3: Interfacing issues (8 Hours)
Interfacing- Basic principles of interfacing memory and I/O devices, 8255A
programmable peripheral interface, Interfacing of D/A and A/D converter, Concept
of serial data transfer, 8251 USART; concept of timer and counter, 8253
programmable timer interval IC.
DEPARTMENT OF APPLIED PHYSICS, UNIVERSITY OF CALCUTTA
Syllabus
Module 4: Instruction set and programming (14 Hours)
Programming of 8085 mocroprocessors: Addressing modes, instruction
set, assembly language programming, simple numerical operations, data
sorting examples, block data movement.
Module 5: 8051 microcontroller introductions (6 Hours)
Microcontroller- 8051 basics, architecture, Internal RAM, SFR area,
Instruction set and basic interfacing programes.
DEPARTMENT OF APPLIED PHYSICS, UNIVERSITY OF CALCUTTA
Lecture Plan
Sl no. Topic Hours
1. Introduction To Microprocessor & 2
Computer
2. 8085 Architecture 2
DEPARTMENT OF APPLIED PHYSICS, UNIVERSITY OF CALCUTTA
Prerequisite
Understanding of
◦ Digital system
◦ Digital number system
◦ Digital Logic
DEPARTMENT OF APPLIED PHYSICS, UNIVERSITY OF CALCUTTA
References
[1] Ramesh S. Goankar, “Microprocessor Architecture,
Programming and Applications with 8085”, 5th Edition, Prentice
Hall
[2] K. Uday Kumar and B. S. Umashankar, ”8085 Microprocessor”,
Pearson India, 2008.
[3] D. V. Hall, “Microprocessors & Interfacing”, McGraw Hill
Higher Education, 1991.
DEPARTMENT OF APPLIED PHYSICS, UNIVERSITY OF CALCUTTA
Virtual Lab:
8085 Simulator: http://vlabs.iitb.ac.in/vlabs-
dev/labs_local/microprocessor/labs/exp7/procedure.php
8051 Simulator: http://vlabs.iitb.ac.in/vlabs-dev/labs/8051-
Microcontroller-Lab/labs/index.php
DEPARTMENT OF APPLIED PHYSICS, UNIVERSITY OF CALCUTTA
Arithmetic Instructions
These instructions perform the operations
like:
◦ Addition
◦ Subtract
◦ Increment
◦ Decrement
Addition
Any 8-bit number, or the contents of register, or the
contents of memory location can be added to the
contents of accumulator.
The result (sum) is stored in the accumulator.
No two other 8-bit registers can be added directly.
Example: The contents of register B cannot be added
directly to the contents of register C.
Subtraction
Any 8-bit number, or the contents of register, or the
contents of memory location can be subtracted from
the contents of accumulator.
The result is stored in the accumulator.
Subtraction is performed in 2’s complement form.
If the result is negative, it is stored in 2’s
complement form.
No two other 8-bit registers can be subtracted
directly.
Increment / Decrement
The 8-bit contents of a register or a memory location
can be incremented or decremented by 1.
The 16-bit contents of a register pair can be
incremented or decremented by 1.
Increment or decrement can be performed on any
register or a memory location.
Arithmetic Instructions
Opcode Operand Description
ADD R Add register or memory to accumulator
M
The contents of register or memory are added to the
contents of accumulator.
The result is stored in accumulator.
If the operand is memory location, its address is specified
by H-L pair.
All flags are modified to reflect the result of the addition.
Example: ADD B or ADD M
Arithmetic Instructions
Opcode Operand Description
ADC R Add register or memory to accumulator
M with carry
The contents of register or memory and Carry Flag (CY) are added
to the contents of accumulator.
The result is stored in accumulator.
If the operand is memory location, its address is specified by H-L
pair.
All flags are modified to reflect the result of the addition.
Example: ADC B or ADC M
Arithmetic Instructions
Opcode Operand Description
ADI 8-bit data Add immediate to accumulator
The 8-bit data is added to the contents of
accumulator.
The result is stored in accumulator.
All flags are modified to reflect the result of the
addition.
Example: ADI 45 H
Arithmetic Instructions
Opcode Operand Description
ACI 8-bit data Add immediate to accumulator with
carry
The 8-bit data and the Carry Flag (CY) are added to
the contents of accumulator.
The result is stored in accumulator.
All flags are modified to reflect the result of the
addition.
Example: ACI 45 H
Arithmetic Instructions
Opcode Operand Description
DAD Reg. pair Add register pair to H-L pair
The 16-bit contents of the register pair are added to the
contents of H-L pair.
The result is stored in H-L pair.
If the result is larger than 16 bits, then CY is set.
No other flags are changed.
Example: DAD B
Arithmetic Instructions
Opcode Operand Description
SUB R Subtract register or memory from
M accumulator
The contents of the register or memory location are subtracted
from the contents of the accumulator.
The result is stored in accumulator.
If the operand is memory location, its address is specified by H-L
pair.
All flags are modified to reflect the result of subtraction.
Example: SUB B or SUB M
Arithmetic Instructions
Opcode Operand Description
SBB R Subtract register or memory from
M accumulator with borrow
The contents of the register or memory location and Borrow Flag
(i.e. CY) are subtracted from the contents of the accumulator.
The result is stored in accumulator.
If the operand is memory location, its address is specified by H-L
pair.
All flags are modified to reflect the result of subtraction.
Example: SBB B or SBB M
Arithmetic Instructions
Opcode Operand Description
SUI 8-bit data Subtract immediate from accumulator
The 8-bit data is subtracted from the contents of the
accumulator.
The result is stored in accumulator.
All flags are modified to reflect the result of
subtraction.
Example: SUI 45 H
Arithmetic Instructions
Opcode Operand Description
SBI 8-bit data Subtract immediate from accumulator
with borrow
The 8-bit data and the Borrow Flag (i.e. CY) is
subtracted from the contents of the accumulator.
The result is stored in accumulator.
All flags are modified to reflect the result of
subtraction.
Example: SBI 45 H
Arithmetic Instructions
Opcode Operand Description
INR R Increment register or memory by 1
M
The contents of register or memory location are
incremented by 1.
The result is stored in the same place.
If the operand is a memory location, its address is
specified by the contents of H-L pair.
Example: INR B or INR M
Arithmetic Instructions
Opcode Operand Description
INX R Increment register pair by 1
The contents of register pair are incremented by 1.
The result is stored in the same place.
Example: INX H
Arithmetic Instructions
Opcode Operand Description
DCR R Decrement register or memory by 1
M
The contents of register or memory location are
decremented by 1.
The result is stored in the same place.
If the operand is a memory location, its address is
specified by the contents of H-L pair.
Example: DCR B or DCR M
Arithmetic Instructions
Opcode Operand Description
DCX R Decrement register pair by 1
The contents of register pair are decremented by 1.
The result is stored in the same place.
Example: DCX H