4. Using the I/O Address Map
ADI16-4(FIT)GY
19
Interrupt Status
This is a port on which the interrupt status generated by the Module can be verified. Although in this
example values are assigned centered on the status concerning interrupt levels, information on
interrupt sources varies from module to module.
Starting
I/O
address
D7
D6
D5
D4
D3
D2
D1
D0
Input
Interrupt Status
+2
(02h)
Enable
Status
0
0
0
IRQ9
IRQ7
IRQ5
Figure 4.4. Interrupt status
-
Enable [D7] :
This verifies the interrupt source enabled/disabled status.
The value "1" indicates that a hardware interrupt on the controller module is enabled.
-
Status [D6] :
This bit indicates an interrupt request status in the module.
When IRQ5, IRQ7, or IRQ9 is "1", this bit will also be "1".
-
IRQ* [D2 to D0]:
These bits allow you to verify the interrupt level that is currently set. The current interrupt level is
indicated as "1".
Following are examples of the initialization that is performed :
IrqStatus = inp( ADR+2 );
Setting an Interrupt Level
Starting
I/O
address
D7
D6
D5
D4
D3
D2
D1
D0
Output
Interrupt Status
+2
(02h)
Enable
N/A
N/A
N/A
N/A
IRQ9 Data IRQ7 Data IRQ5 Data
Figure 4.5. Setting an interrupt level
-
Enable [D7]:
This bit enables an interrupt source.
-
IRQ* [D2 to D0]:
The interrupt level used by the module is set in these bits.
Following are examples of initialization settings that can be effected :
The interrupt level to be used is assigned to IRQ5.
outp( ADR+2, 0x81 );