2 BasicIO With Notes
2 BasicIO With Notes
Yuchen Huang
Control
Memory
0x107
0x106
0x105
0x104
0x103
0x102
0x101
0x100
0x107 0x107
0x106 0x106
0x105 0x105
0x104 0x104
0x103 Most significant byte 0x103 Least significant byte
0x102 Least significant byte 0x102 Most significant byte
0x101 0x101
0x100 0x103 0x102 0x100 0x102 0x103
MSB LSB MSB LSB
Little Endian Big Endian
D15
BHE# A0 Refers to
0 0 16 bits (D0..D15)
0 1 8 bits (D8..D15)
1 0 8 bits (D0..D7)
1 1 <reserved>
ECE 485/585: Basic I/O 14
8086 in Maximum Mode *
*
With 8087 co-processor
Read Cycle
Write Cycle
18
ECE 485/585: Basic I/O
8086 Bus Timing
Half-interlocked, request/acknowledge
communication
Suitable for interfacing between devices of different speeds,
more reliable
Fully-interlocked, request/acknowledge
communication
Suitable for interfacing between devices of different
speeds, more reliable
3
ECE 485/585: Basic I/O 23
Port Devices
Microprocessor
Port Peripheral
16
Device
/STB
ACK
Memory
I/O Device
3
Interrupt Descriptor Table IDT[Vector x 4] to get new CS:IP
1
0 CS:IP (PC) of ISRs
ECE 485/585: Basic I/O 38
Why multiply interrupt by 4?
Intel
8086
Memory
I/O Device
count
Programmed I/O
MOV
MOV
DX, FFF8H
CX, COUNT
; set up I/O port
; set up byte
Memory
I/O Device
Memory
I/O Device
DMA Controller
AEN
5
5
3
1
4
ECE 485/585: Basic I/O 51
DMA Timing