83:Ports:03
From WikiTI
Synopsis
Port Number: 03h
Function: Interrupt Control Port
This port controls all devices that can generate interrupts.
Read Values
- Bit 0: Set if the ON key generated an interrupt.
- Bit 1: Set if the first hardware timer generated an interrupt.
- Bit 2: Set if the second hardware timer generated an interrupt.
- Bit 3: Reset if the ON key is being pressed; set otherwise.
- Bit 4-7: Unused.
Write Values
- Bit 0: Set 0 to disable ON key interrupts and to acknowledge an ON key interrupt. Set 1 to enable ON key interrupts.
- Bit 1: Set 0 to disable interrupts from the first timer and to acknowledge an interrupt from the first timer. Set 1 to enable interrupts from the first timer.
- Bit 2: Set 0 to disable interrupts from the second timer and to acknowledge an interrupt from the second timer. Set 1 to enable interrupts from the second timer.
- Bit 3: Set 0 to turn off the LCD. Set 1 to enable the LCD.
- Bit 4-7: Unused.
Comments
- Outside an interrupt routine, this port always reads either 00h or 08h.
- You need to acknowledge interrupts. Otherwise a new interrupt will be generated directly after you enable interrupts again with EI. Because that disables that particular interrupt at the same time, you may have to write a second value to this port to reenable it.