Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
System Interfacing
Methods of Interfacing
• There are two methods of interfacing memory
or I/O devices with microprocessor
1. I/O mapped I/O
2. Memory mapped I/O
• In I/O mapped I/O, I/O device is treated as a
I/O device and memory as memory.
• In memory mapped I/O, I/O devices are also
treated as memory.
I/O mapped I/O
• I/O device is treated as I/O device & memory
as memory
• Each I/O device uses
– either 8 address lines (Fixed port)
– or 16 address lines ( Variable port)
• In fixed port 256 input and 256 output devices
can be connected
• Invariable port, 65,536 input & 65,536 output
devices can be used
Instructions used in Fixed type
addressing
• Any address line A0 - A7 or A8 – A15 can be
used.
• A16 - A19 are all 0’s.
• IN AL, 8 bit port address
• IN AX, 8 bit port address
• OUT 8 bit port address, AL
• OUT 8 bit port address, AX
Instructions used in Variable type
addressing
• Address lines A0 - A15 are be used.
• A16 - A19 are all 0’s.
• MOV DX, 16bit port address
• IN AL,DX
• IN AX,DX
• OUT DX,AL
• OUT DX,AX
Chapter6
Chapter6
Chapter6
Chapter6
Chapter6
Chapter6
Chapter6
Chapter6
Chapter6

More Related Content

Chapter6

  • 2. Methods of Interfacing • There are two methods of interfacing memory or I/O devices with microprocessor 1. I/O mapped I/O 2. Memory mapped I/O • In I/O mapped I/O, I/O device is treated as a I/O device and memory as memory. • In memory mapped I/O, I/O devices are also treated as memory.
  • 3. I/O mapped I/O • I/O device is treated as I/O device & memory as memory • Each I/O device uses – either 8 address lines (Fixed port) – or 16 address lines ( Variable port) • In fixed port 256 input and 256 output devices can be connected • Invariable port, 65,536 input & 65,536 output devices can be used
  • 4. Instructions used in Fixed type addressing • Any address line A0 - A7 or A8 – A15 can be used. • A16 - A19 are all 0’s. • IN AL, 8 bit port address • IN AX, 8 bit port address • OUT 8 bit port address, AL • OUT 8 bit port address, AX
  • 5. Instructions used in Variable type addressing • Address lines A0 - A15 are be used. • A16 - A19 are all 0’s. • MOV DX, 16bit port address • IN AL,DX • IN AX,DX • OUT DX,AL • OUT DX,AX