92 Chapter 2: TI-83 Plus Specific Information
TI-83 Plus Developer Guide Third Release May 28, 2002
APD
(Automatic Power Down
)
Applications have the choice of allowing the APD feature of the TI-83 Plus to be active
or not. APD is implemented to preserve battery life by turning the calculator off after
about four minutes of inactivity. Unless an application’s functionality absolutely requires
that APD be disabled, it should be left active.
How does APD
work?
Under normal system operation, the APD counter is reset after each key press. If no key
press is made in approximately four minutes, the calculator powers down.
Similar to the run indicator, the APD counter is updated by the interrupt handler;
therefore, interrupts must be enabled. When the APD counter is exhausted, the
calculator turns off. The interrupt handler routine is not exited.
The application is not notified that the calculator has been turned off. The contents of
the screen are saved in the 768 bytes of RAM located at
saveSScreen, which is a bit
image representation of the screen.
When the calculator is turned back on, the screen is restored and the interrupt handler
is exited. Execution resumes at the location of the last interrupt before the calculator is
powered down. Applications should not be affected by this event in any way.
• Resetting the APD counter
This routine will reset the APD counter.
B_CALL ApdSetup
The GetKey routine will make a call to this routine upon entry.
• Disabling APD
There are two ways to disable APD and each have a specific situation in which they
should be used.
– Disable APD when calling the GetKey routine.
B_CALL DisableApd
This method of disabling the APD is a global, and will stay in effect after an
application exits. Applications need to re-enable the APD before exiting.
B_CALL EnableApd
– Disable APD while executing outside of the GetKey routine.
RES apdRunning,(IY+apdFlags)
APD will be disabled until this flag is set, or the GetKey routine is called.