Difference between revisions of "86:Ports:03"

From WikiTI
Jump to: navigation, search
(Typo in category link)
(Fixed bit 1 & 3 write descriptions & linked to LCD controller page)
 
Line 9: Line 9:
 
=== Read Values ===
 
=== Read Values ===
 
* Bit 0: Set if the ON key generated an interrupt.
 
* Bit 0: Set if the ON key generated an interrupt.
* Bit 1: Set if the LCD controller generated an interrupt (after DMA for rows 17 & 49). Used by the OS as a periodic interrupt source (approximately 200 Hz).
+
* Bit 1: Set if the [[86:LCD_Controller|LCD controller]] generated an interrupt (after [[86:LCD_Controller#DMA|DMA]] for rows 17 & 49). Used by the OS as a periodic interrupt source (approximately 200 Hz).
 
* Bit 2: Set if the /INT pin generated an interrupt (unused on the TI-86).
 
* Bit 2: Set if the /INT pin generated an interrupt (unused on the TI-86).
 
* Bit 3: Reset if the ON key is being pressed; set otherwise.
 
* Bit 3: Reset if the ON key is being pressed; set otherwise.
Line 16: Line 16:
 
=== Write Values ===
 
=== 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 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 LCD controller interrupts & to acknowledge an interrupt from the LCD controller. Set 1 to enable interrupts from the first timer.
+
* Bit 1: Set 0 to disable [[86:LCD_Controller#Interrupts|LCD controller interrupts]] & to acknowledge an interrupt from the LCD controller. Set 1 to enable interrupts from the LCD controller.
 
* Bit 2: Set 0 to disable external interrupts & to acknowledge an external interrupt. Set 1 to enable external interrupts.
 
* Bit 2: Set 0 to disable external interrupts & to acknowledge an external interrupt. Set 1 to enable external interrupts.
* Bit 3: Set 0 to turn off the LCD. Set 1 to turn on the LCD.
+
* Bit 3: Set 0 to turn off the LCD. Set 1 to turn on the LCD. When the LCD is off, DMA & LCD interrupts do not occur.
 
* Bit 4-7: Unused.
 
* Bit 4-7: Unused.
  

Latest revision as of 05:03, 20 September 2021

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 LCD controller generated an interrupt (after DMA for rows 17 & 49). Used by the OS as a periodic interrupt source (approximately 200 Hz).
  • Bit 2: Set if the /INT pin generated an interrupt (unused on the TI-86).
  • 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 LCD controller interrupts & to acknowledge an interrupt from the LCD controller. Set 1 to enable interrupts from the LCD controller.
  • Bit 2: Set 0 to disable external interrupts & to acknowledge an external interrupt. Set 1 to enable external interrupts.
  • Bit 3: Set 0 to turn off the LCD. Set 1 to turn on the LCD. When the LCD is off, DMA & LCD interrupts do not occur.
  • 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 re-enable it.
  • The OS shuts down by turning off the LCD & HALTing with the ON key interrupt enabled.