1
MICROPROCESSOR & MICROCONTROLLER-MTE301
Dr. Susanta Kumar Rout
School of Engineering
Ajeenkya D Y Patil University,
Pune, Maharashtra, India
Email: susanta.rout@adypu.edu.in
Cont.No:7978072036, 9937681996
2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
2
1.Course number and name : MTE301-Microprocessor & Microcontroller
2.Credits and contact hours : 3-Credits and 3-hours/week
3.Instructor’s or course coordinator’s name: Dr. Susanta Kumar Rout
4.Text book, title, and author
A. The 8051 Microcontroller and Embedded Systems using Assembly and C,
MuhammasMazidi, Janice Mazidi and RolinMcKinlay, Pearson Education, 2nd
edition.
B. The 8051 Microcontroller, Kenneth J. Ayala, Cengage Learning.
5. Reference book, title, and author
A. Microcontrollers Theory and Applications, Ajay Deshmukh, TATA McGraw Hill.
B. Embedded Systems and Robots- Projects using the 8051 Microcontroller, Subrata
Ghoshal, Cengage Learning.
2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
Microprocessor & Microcontroller-MTE301
3
MPMC SYLLABUS
1. Introduction to Microprocessors
 Study of Microprocessor architecture with suitable examples, Study of Von Newman and
Harvard architecture, comparison of CISC and RISC Processors, Study of microcontroller
architecture and special features and its advantages, Memory interfacing with
microprocessors and microcontrollers. Memory mapped and IO mapped interfacing.
Clock frequency and speed of instruction execution. Measurement of performance of
microprocessor.
2. Architecture of 8051 Microcontroller
 8051 architecture, Pin description, Internal and external memories, timing diagrams for
memory interfacing, Counters and Timers, Serial communication, Stack and Stack
Pointer, Port Structure and Interrupts.
2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
4
3. Addressing Mode and Instruction Set of 8051
 8051 Addressing modes, 8051 Instruction set, Microcontroller Application Development
tools- Simulator, Emulator, In-circuit Emulator (ICE), Logic Analyzer, ISP, Cross
assembler, Introduction to Embedded C programming.
4. Real World Interfacing
 Interfacing 8051/89C51 to LED with and without interrupt, ADC, DAC, LCD and keypad
(consider debounce), Stepper motor, SPI bus. RS 232, RS 485, I2C bus standard,
Interfacing ADC, DAC, memory, RTC with 8051 using I2C bus.
5. Case Study: Data Acquisition System Design
 Designing microcontroller-based Data Acquisition System. Design of sensor interfacing,
signal conditioning of input stage, selection of ADC, selection of output drivers. Writing
efficient programs using Assembly language or Embedded C.
2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
MPMC SYLLABUS
5 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
1. Introduction to Microprocessors
 Study of Microprocessor architecture with suitable examples.
 Study of Von-Newman and Harvard architecture.
 Comparison of CISC and RISC Processors.
 Study of microcontroller architecture and special features and its advantages.
 Memory interfacing with microprocessors and microcontrollers.
 Memory mapped and IO mapped interfacing.
 Clock frequency and speed of instruction execution.
 Measurement of performance of microprocessor.
Microprocessor & Microcontroller-MTE301
6 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
8085-Microprocessor
Here, we will discuss about,
1. Feature of 8085.
2. Pin Configuration of 8085.
3. Architecture of 8085.
4. Register Structure of 8085.
5. Bus Organisation of 8085.
6. Timing, control, and instruction set of 8085 microprocessor.
7 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
Microprocessor and microcontroller
Dr. Susanta Kumar Rout
INSTRUCTION SET OF 8085
The vocabulary of the machine
8 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
The Vocabulary of the Machine
“If u want to interact/make friendship with some body then the best way to
do it, is to learn the language the person speaks”.
The language microprocessor and microcontroller understand is know as
machine language and the machine language each word is known as instruction.
The set of instruction which a microprocessor understands is known as
instruction set.
The instruction is nothing but the set of binary numbers i.e. 0 and 1 inside a
memory.
9 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
Memory location Main memory HEX INSTRUCTION SIZE(BYTE)
Op-code Operand
4000H 0011 1010 3AH
LDA 003AH 3
4001H 0011 1010 3AH
4002H 0000 0000 00H
4003H 0100 0111 47H MOV B, A 1
4004H 0011 1010 3AH
LDA 003BH 3
4005H 0011 1011 3BH
4006H 0000 0000 00H
4007H 1000 0000 80H ADD B 1
4008H 0011 0010 32H
STA 003CH 3
4009H 0011 1100 3CH
400AH 0000 0000 00H
400BH 0111 0110 76H HLT 1
Addition of Two Number
10 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
It is nothing but an abbreviation or mental image or symbol and this symbolic
name signifies what operation it performs.
Mnemonics
11 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
Instruction Set (Cont…)
An instruction is a command given to the microprocessor to perform a
specific operation on given data.
Each instruction contain two parts
(a) operational code (op code)
(b) operand
NOTE: Intel 8085 microprocessor have 74 instruction and 246 op-code.
12 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
The instruction set can be categorized into FIVE different groups.
1. Data transfer group.
2. Arithmetic group.
3. Branch group.
4. Logic group.
5. Stack, input/out put and machine control group.
Instruction Set (Cont…)
13 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
The data transfer group of instructions load given data into registers,
move data between register and move data between registers and memory
location.
A. Register to register.
B. Register to memory.
C. Memory to register.
D. Immediate data to register.
E. Immediate data to memory.
F. Exchange
Data Transfer Group
14 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
1. MOV R1, R2 (Move the content of one register to another).
Example :
i. MOV A, B
(This instruction will copy the data from source register “B” into accumulator “A”)
ii. MOV B, A
(It will copy the data from accumulator “A” into destination register “B” )
2. MOV R, M (Move the content of memory to register).
Example:
LXI H, 2000H (It will load 20H into H register and 00H into L register)
MOV B, M (The 8-bit data content of the memory location as pointed by HL
register pair will be moved to the register “B”. It is an instruction to load
register “B” with the 8-bit data from a specified memory location whose 16-bit
address is in HL register pair.)
HLT
Data Transfer Group (Cont…)
15 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
3. MOV M, R (Move the content of register to memory)
Example:
i. MOV M, C
(Moves the content of register C to the memory location whose address is in H-L pair)
4. MVI R , DATA (Move immediate data to register)
Example:
i. MVI A , 05H
(This instruction will load 05H into accumulator)
Data Transfer Group (Cont…)
16 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
5. MVI M, DATA (Move immediate data to memory)
Example:
i. LXI H, 2400H ; load H-L pair with 2400H
MVI M, 08H ; Move 08H to memory location 2400H
HLT
6. LXI RP, DATA 16 (Load register pair immediate)
(It loads immediate 16-bit data specified within the instruction into register pair or
stack pointer. The RP is 16-bit register pair such as BC, DE, HL)
[RP] = DATA 16-bit, [RH] = 8 MSBs, [RL] = 8 LSBs.
Example:
LXI H, 2023H
Data Transfer Group (Cont…)
17 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
7. LDA addr (Load accumulator direct)
Example:
i. LDA 2400H
This instruction will load the content of memory location 2400H to accumulator.
8. STA addr (Store accumulator direct)
Example:
i. MVI A, 05H
STA 2400H
This instruction will store the content of the accumulator in the memory location 2400H.
Data Transfer Group (Cont…)
18 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
9. LHLD addr (Load H-L pair direct)
L <= content of addr, H <= content of (addr+1).
Example: (2500H)= 30H, (2501H) = 60H
[L]=30H, [H]=60H
10. SHLD addr (Store H-L pair direct)
L => content of addr, H => content of (addr+1) .
Example:
i. LXI H, 1627H (It will load 16H into register H and 27H into register L)
SHLD, 2400
11. LDAX RP (It copies the contents of memory location whose address is specified
by the register pair into the accumulator. The RP is BC or DE register pair.
The register pair is used as a memory pointer.)
Example:
i. LXI B 2400H
LDAX B (This instruction will load the content of the memory location
whose address is in B-C pairs into accumulator.)
Data Transfer Group (Cont…)
19 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
12. STAX RP (Store accumulator indirect)
Example:
i. LXI B, 2400H
MVI A, 05H
STAX B
This instruction will store the content of the accumulator in the memory location
whose address is in BC pairs.
13. XCHG (Exchange the content of H-L pair with D-E pair)
Example:
DE= 2040H, HL= 7080H
H= 20H, L= 40H, D=70H and E=80H
Data Transfer Group (Cont…)
20 2/8/2023
ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout

Lec_5_MPMC.pdf

  • 1.
    1 MICROPROCESSOR & MICROCONTROLLER-MTE301 Dr.Susanta Kumar Rout School of Engineering Ajeenkya D Y Patil University, Pune, Maharashtra, India Email: susanta.rout@adypu.edu.in Cont.No:7978072036, 9937681996 2/8/2023 ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
  • 2.
    2 1.Course number andname : MTE301-Microprocessor & Microcontroller 2.Credits and contact hours : 3-Credits and 3-hours/week 3.Instructor’s or course coordinator’s name: Dr. Susanta Kumar Rout 4.Text book, title, and author A. The 8051 Microcontroller and Embedded Systems using Assembly and C, MuhammasMazidi, Janice Mazidi and RolinMcKinlay, Pearson Education, 2nd edition. B. The 8051 Microcontroller, Kenneth J. Ayala, Cengage Learning. 5. Reference book, title, and author A. Microcontrollers Theory and Applications, Ajay Deshmukh, TATA McGraw Hill. B. Embedded Systems and Robots- Projects using the 8051 Microcontroller, Subrata Ghoshal, Cengage Learning. 2/8/2023 ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout Microprocessor & Microcontroller-MTE301
  • 3.
    3 MPMC SYLLABUS 1. Introductionto Microprocessors  Study of Microprocessor architecture with suitable examples, Study of Von Newman and Harvard architecture, comparison of CISC and RISC Processors, Study of microcontroller architecture and special features and its advantages, Memory interfacing with microprocessors and microcontrollers. Memory mapped and IO mapped interfacing. Clock frequency and speed of instruction execution. Measurement of performance of microprocessor. 2. Architecture of 8051 Microcontroller  8051 architecture, Pin description, Internal and external memories, timing diagrams for memory interfacing, Counters and Timers, Serial communication, Stack and Stack Pointer, Port Structure and Interrupts. 2/8/2023 ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout
  • 4.
    4 3. Addressing Modeand Instruction Set of 8051  8051 Addressing modes, 8051 Instruction set, Microcontroller Application Development tools- Simulator, Emulator, In-circuit Emulator (ICE), Logic Analyzer, ISP, Cross assembler, Introduction to Embedded C programming. 4. Real World Interfacing  Interfacing 8051/89C51 to LED with and without interrupt, ADC, DAC, LCD and keypad (consider debounce), Stepper motor, SPI bus. RS 232, RS 485, I2C bus standard, Interfacing ADC, DAC, memory, RTC with 8051 using I2C bus. 5. Case Study: Data Acquisition System Design  Designing microcontroller-based Data Acquisition System. Design of sensor interfacing, signal conditioning of input stage, selection of ADC, selection of output drivers. Writing efficient programs using Assembly language or Embedded C. 2/8/2023 ADYPU, Pune, Maharashtra, India Dr. Susanta kumar Rout MPMC SYLLABUS
  • 5.
    5 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout 1. Introduction to Microprocessors  Study of Microprocessor architecture with suitable examples.  Study of Von-Newman and Harvard architecture.  Comparison of CISC and RISC Processors.  Study of microcontroller architecture and special features and its advantages.  Memory interfacing with microprocessors and microcontrollers.  Memory mapped and IO mapped interfacing.  Clock frequency and speed of instruction execution.  Measurement of performance of microprocessor. Microprocessor & Microcontroller-MTE301
  • 6.
    6 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout 8085-Microprocessor Here, we will discuss about, 1. Feature of 8085. 2. Pin Configuration of 8085. 3. Architecture of 8085. 4. Register Structure of 8085. 5. Bus Organisation of 8085. 6. Timing, control, and instruction set of 8085 microprocessor.
  • 7.
    7 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout Microprocessor and microcontroller Dr. Susanta Kumar Rout INSTRUCTION SET OF 8085 The vocabulary of the machine
  • 8.
    8 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout The Vocabulary of the Machine “If u want to interact/make friendship with some body then the best way to do it, is to learn the language the person speaks”. The language microprocessor and microcontroller understand is know as machine language and the machine language each word is known as instruction. The set of instruction which a microprocessor understands is known as instruction set. The instruction is nothing but the set of binary numbers i.e. 0 and 1 inside a memory.
  • 9.
    9 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout Memory location Main memory HEX INSTRUCTION SIZE(BYTE) Op-code Operand 4000H 0011 1010 3AH LDA 003AH 3 4001H 0011 1010 3AH 4002H 0000 0000 00H 4003H 0100 0111 47H MOV B, A 1 4004H 0011 1010 3AH LDA 003BH 3 4005H 0011 1011 3BH 4006H 0000 0000 00H 4007H 1000 0000 80H ADD B 1 4008H 0011 0010 32H STA 003CH 3 4009H 0011 1100 3CH 400AH 0000 0000 00H 400BH 0111 0110 76H HLT 1 Addition of Two Number
  • 10.
    10 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout It is nothing but an abbreviation or mental image or symbol and this symbolic name signifies what operation it performs. Mnemonics
  • 11.
    11 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout Instruction Set (Cont…) An instruction is a command given to the microprocessor to perform a specific operation on given data. Each instruction contain two parts (a) operational code (op code) (b) operand NOTE: Intel 8085 microprocessor have 74 instruction and 246 op-code.
  • 12.
    12 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout The instruction set can be categorized into FIVE different groups. 1. Data transfer group. 2. Arithmetic group. 3. Branch group. 4. Logic group. 5. Stack, input/out put and machine control group. Instruction Set (Cont…)
  • 13.
    13 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout The data transfer group of instructions load given data into registers, move data between register and move data between registers and memory location. A. Register to register. B. Register to memory. C. Memory to register. D. Immediate data to register. E. Immediate data to memory. F. Exchange Data Transfer Group
  • 14.
    14 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout 1. MOV R1, R2 (Move the content of one register to another). Example : i. MOV A, B (This instruction will copy the data from source register “B” into accumulator “A”) ii. MOV B, A (It will copy the data from accumulator “A” into destination register “B” ) 2. MOV R, M (Move the content of memory to register). Example: LXI H, 2000H (It will load 20H into H register and 00H into L register) MOV B, M (The 8-bit data content of the memory location as pointed by HL register pair will be moved to the register “B”. It is an instruction to load register “B” with the 8-bit data from a specified memory location whose 16-bit address is in HL register pair.) HLT Data Transfer Group (Cont…)
  • 15.
    15 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout 3. MOV M, R (Move the content of register to memory) Example: i. MOV M, C (Moves the content of register C to the memory location whose address is in H-L pair) 4. MVI R , DATA (Move immediate data to register) Example: i. MVI A , 05H (This instruction will load 05H into accumulator) Data Transfer Group (Cont…)
  • 16.
    16 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout 5. MVI M, DATA (Move immediate data to memory) Example: i. LXI H, 2400H ; load H-L pair with 2400H MVI M, 08H ; Move 08H to memory location 2400H HLT 6. LXI RP, DATA 16 (Load register pair immediate) (It loads immediate 16-bit data specified within the instruction into register pair or stack pointer. The RP is 16-bit register pair such as BC, DE, HL) [RP] = DATA 16-bit, [RH] = 8 MSBs, [RL] = 8 LSBs. Example: LXI H, 2023H Data Transfer Group (Cont…)
  • 17.
    17 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout 7. LDA addr (Load accumulator direct) Example: i. LDA 2400H This instruction will load the content of memory location 2400H to accumulator. 8. STA addr (Store accumulator direct) Example: i. MVI A, 05H STA 2400H This instruction will store the content of the accumulator in the memory location 2400H. Data Transfer Group (Cont…)
  • 18.
    18 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout 9. LHLD addr (Load H-L pair direct) L <= content of addr, H <= content of (addr+1). Example: (2500H)= 30H, (2501H) = 60H [L]=30H, [H]=60H 10. SHLD addr (Store H-L pair direct) L => content of addr, H => content of (addr+1) . Example: i. LXI H, 1627H (It will load 16H into register H and 27H into register L) SHLD, 2400 11. LDAX RP (It copies the contents of memory location whose address is specified by the register pair into the accumulator. The RP is BC or DE register pair. The register pair is used as a memory pointer.) Example: i. LXI B 2400H LDAX B (This instruction will load the content of the memory location whose address is in B-C pairs into accumulator.) Data Transfer Group (Cont…)
  • 19.
    19 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout 12. STAX RP (Store accumulator indirect) Example: i. LXI B, 2400H MVI A, 05H STAX B This instruction will store the content of the accumulator in the memory location whose address is in BC pairs. 13. XCHG (Exchange the content of H-L pair with D-E pair) Example: DE= 2040H, HL= 7080H H= 20H, L= 40H, D=70H and E=80H Data Transfer Group (Cont…)
  • 20.
    20 2/8/2023 ADYPU, Pune,Maharashtra, India Dr. Susanta kumar Rout