Difference between revisions of "83Plus:Ports:40"
m |
|||
Line 1: | Line 1: | ||
== Synopsis == | == Synopsis == | ||
− | '''Port | + | '''Port Number:''' 40h |
'''Function:''' Clock Control Port (as shown on the mode screen) | '''Function:''' Clock Control Port (as shown on the mode screen) |
Revision as of 19:16, 26 March 2005
Contents
Synopsis
Port Number: 40h
Function: Clock Control Port (as shown on the mode screen)
These ports allow the TI-84+/SE calculators to have a clock that can keep time, even when the calulator is turned off. The TI-83+/SE does not have this functionality.
For further information on the clock, read the documentation for ports 41h-44h and ports 45h-48h.
Read Values
- Bit 0: Set to 1 if the clock is enabled, 0 if it's disabled.
- Bit 1: Set command bit, see the comments.
Write Values
- Bit 0: Outputting with this bit enabled will turn on the clock, with it disabled turns off the clock.
- Bit 1: Set command bit, see the comments.
Comments
If you play with bit 1, you notice that you can turn it on and off as you would bit 0. Still, the actual value of this bit is totally useless. All that matters is if you turn the bit on, then the clock is set (the values in ports 41h-44h are copied to 45h-48h.) Still, you can't simply output 2 to set the clock, as if bit 1 was already on, it wouldn't actually set (the set only occurs if the bit is changed from 0 to 1.) The example code shows how to start the clock.
Example
; This will set the clock back to it's start time xor a out (41h), a out (42h), a out (43h), a out (44h), a ; This assures that the set command bit is off ld a, 1 out (40h), a ; And set (and start) the clock ld a, 3 out (40h), a
Credits and Contributions
- Michael Vincent: Initial Documentation