Professional Documents
Culture Documents
MPMC - Memory and Interfacing
MPMC - Memory and Interfacing
MICROCONTROLLERS
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 1
UNIT - II
8086 MEMORY
AND
I/O INTERFACING
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 2
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 3
Status Signals
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 4
Status Signals
BHE A0 Indication
0 0 Whole word
1 1 None
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 5
Minimum Mode 8086 System
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 6
Minimum Mode 8086 System
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 7
Maximum Mode 8086 System
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 8
Maximum Mode 8086 System
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 9
Memory Interfacing
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 10
Memory Interfacing
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 11
Memory Interfacing
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 12
TUTORIAL
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 13
Procedures and Macros
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 14
Procedures
• The procedure is a group of instructions stored as a separate program in
the memory and it is called from the main program whenever required
using CALL instruction.
• For calling the procedure we have to store the return address (next
instruction address followed by CALL) onto the stack.
• At the end of the procedure RET instruction used to return the execution to
the next instruction in the main program by retrieving the address from the
top of the stack.
• Machine codes for the procedure instructions put only once in memory.
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 15
Passing the Parameters
• 1. In registers
• 2. In dedicated memory location accessed by name
• 3. With pointers passed in registers
• 4. With the stack
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 16
Procedure Syntax
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 17
Procedures
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 18
Macro
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 19
Macro Syntax
• macroname MACRO
• instruction1
• instruction2
• .
• . ENDM
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 20
Procedures vs Macros
• Advantages of Procedures:
• The machine codes for the group of instructions in the procedure
only have to be put once.
• Disadvantages of Procedures:
• Need for stack
• Overhead time required to call the procedure and return to the
calling program
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 21
Procedures vs Macros
• Advantages of Macros:
• Macro avoids overhead time involving in calling and returning from a
procedure.
• Disadvantages of Macros:
• Generating in line code each time a macro is called is that this will
make the program take up more memory than using a procedure.
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 22
Steps involved to service the Interrupts
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 23
Interrupt Vector Table
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 24
End
Friday, June 17, 2022 Department of Electronics and Communication Engineering, LBRCE 25