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 put the calculator in low power mode if and only if the Z80 cpu enters the halt state (during the executing of a halt instruction). Set 1 to keep the calculator powered.
- Bit 4-7: Unused.
Comments
- 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.
- In low power mode it is known that at least the lcd driver enters standby mode and that the timer hardware has been disabled.