From WikiTI
Jump to: navigation, search
This port only exists on the the TI-84 Plus and the TI-84 Plus Silver Edition. On the standard TI-83 Plus, it acts as a shadow of port 00. On the TI-83 Plus Silver Edition, this port has no effect.


Port Number: 40h

Function: Clock Control Port

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.


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.


; This will set the clock back to its 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