MPMC Unit 3
MPMC Unit 3
MICROCONTROLLERS
B. Tech – CSE (IOT)
III Year II Semester
UNIT - III
2
8086 Microprocessor
Interfacing I/O and peripheral devices
I/O devices
Interrupt driven I/ O
I/O device interrupts the
processor and initiate data
transfer
Direct memory access
Data transfer is achieved by 3
bypassing the microprocessor
Accessing I/O Devices
Processor Memory
BUS
I/O Space
address
16-bit
M/IO’ = 0
M/IO’ = 1
• Polled I/O
• DMA I/O
Polled IO versus Interrupt Driven I/O
Bit set reset (BSR) mode – This mode is used to set or reset the bits of
port C only, and selected when the most significant bit (D7) in the control
register is 0.
21
Input/output mode (I/O)
Mode 0
8 9 A B
4 5 6 7
0 1 2 3
0 on Port A
selects the row
If a key is pressed,
The corresponding
Column bit will
Make Port B bit 1
24
10
26
27
82C55: Mode 0, Interfacing of Stepper motor with 8086
Step angle,
a b
1
N
One
6 pole rotor S step
N N
2 2
S S
N
Winding number 2 S
1
a b
2
35
82C55: Mode 0, 7 segment Multiple digit Display
Group
Group A
A Group
Group B
B
Hand shaking
signals
8086
INT
R
PC 3
IBF (input buffer
PC 5 full)
Micro processor & assembly
05/30/2024 43
language
Mode 2
Hand shaking
Bidirectional 8 signals
bit I/O port
47
Micro processor & assembly
05/30/2024 48
language
49
Micro processor & assembly
05/30/2024 50
language
Micro processor & assembly
05/30/2024 51
language
Micro processor & assembly
05/30/2024 52
language
53
8086 Microprocessor
Memory
Processor Memory
Registers inside a microcomputer
Store data and results temporarily
No speed disparity
Cost
Secondary Memory
Storage media comprising of slow
devices such as magnetic tapes and
disks
Hold large data files and programs:
Operating system, compilers,
databases, permanent programs etc. 54
55
8086 Microprocessor
Memory organization in 8086
8086 : 16-bit
Bank 0 : A0 = 0 Even
addressed memory bank
Bank 1 : = 0 Odd
addressed memory bank
56
8086 Microprocessor
Memory organization in 8086
58
8086 Microprocessor
Interfacing SRAM and EPROM
59
8086 Microprocessor
Interfacing SRAM and EPROM
60
8086 Microprocessor
Interfacing SRAM and EPROM
61
MEMORY INTERFACE USING RAMS, EPROMS AND EEPROMS
65
66
67
68
Interrupt Vector Table (IVT) of 8086 69
70
8259
• Data segment
• Message db 0AH,0DH, ‘ MICROPROCESSOR’ 0AH,0DH, “$”
• Date ends
• Code segment
• Assume DS: Data, CS: Code
• Start:
– Mov AX, Data
– MOV DS,AX
– MOV DX, offset message
– MOV AH, 09H
– INT 21H
– Int 3H
• Code ends
• End start