Difference between revisions of "83Plus:Ports:40"

From WikiTI
Jump to: navigation, search
m
 
Line 1: Line 1:
 
[[Category:83Plus:Ports:By_Address|40 - Clock Control]] [[Category:83Plus:Ports:By_Name|Clock Control]]
 
[[Category:83Plus:Ports:By_Address|40 - Clock Control]] [[Category:83Plus:Ports:By_Name|Clock Control]]
 +
{{84P-Only Port|00}}
 +
 
== Synopsis ==
 
== Synopsis ==
 
'''Port Number:''' 40h
 
'''Port Number:''' 40h

Latest revision as of 14:05, 30 March 2005

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.

Synopsis

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.

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 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