<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3APorts%3APort02</id>
	<title>Z80:Ports:Port02 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3APorts%3APort02"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Ports:Port02&amp;action=history"/>
	<updated>2026-06-03T13:39:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=Z80:Ports:Port02&amp;diff=352&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Ports:Port02&amp;diff=352&amp;oldid=prev"/>
		<updated>2016-02-06T07:13:38Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Basic Info =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port Address: 02&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
This port reports various status information, including battery strength, LCD driver status, and calculator type.&lt;br /&gt;
&lt;br /&gt;
= Writing to Port =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TI-83+ (Non-SE)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
No effect.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TI-83+SE, TI-84+, TI-84+SE, TI-84+CSE&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Bit 0: Write a 0 to acknowledge the ON key interrupt; write 1 to leave the status of the ON key interrupt alone.&lt;br /&gt;
Bit 1: ACK HW timer 1&lt;br /&gt;
Bit 2: ACK HW timer 2&lt;br /&gt;
Bit 3: Ignored&lt;br /&gt;
Bit 4: ACK Linkport&lt;br /&gt;
Bits 5-7: Ignored&lt;br /&gt;
&lt;br /&gt;
= Reading from Port =&lt;br /&gt;
Bit 0: Set if the batteries are good. Reset if the batteries are low. The calculator will refuse to Garbage Collect or receive a FLASH App or OS when the batteries are low. The voltage cutoff can be configured in port 04.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;83+SE / 84+(SE) only:&amp;#039;&amp;#039;&amp;#039; Bit 1: At 15MHz this bit resets for a set delay after a command or data is sent to the LCD, otherwise this bit is always set. The amount of delay is controlled by port 2F. On the TI-73, this bit is always reset (this is how you distinguish between the 73 and 83+ series hardware).&lt;br /&gt;
Bit 2: Set if Flash is currently unlocked.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;83+ only:&amp;#039;&amp;#039;&amp;#039; Bits 3-5:&lt;br /&gt;
Bit 3: Last value written to port 05 bit 0&lt;br /&gt;
Bit 4: Last value written to port 05 bit 1&lt;br /&gt;
Bit 5: Last value written to port 05 bit 2&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;84+(SE) only:&amp;#039;&amp;#039;&amp;#039; Bit 5: Set for TI-84+ and TI-84+ SE calculators. Reset for TI-83+ and TI-83+ SE calculators. More specifically, this indicates if the calculator is USB-capable or not.&lt;br /&gt;
Bit 6: Indicates if Link Assist is available.&lt;br /&gt;
Bit 7: Reset for a TI-83+ Basic. Set for everything else.&lt;br /&gt;
&lt;br /&gt;
= Example Uses =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Battery checking&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    push af&lt;br /&gt;
      in a, (2)&lt;br /&gt;
      and 01h&lt;br /&gt;
      call nz, BatteriesGood&lt;br /&gt;
      call z, BatteriesLow&lt;br /&gt;
      pop af&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;LCD Testing&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
    push af&lt;br /&gt;
    WaitLoop:&lt;br /&gt;
      in a, (2)&lt;br /&gt;
      and 02h&lt;br /&gt;
      jr z, WaitLoop&lt;br /&gt;
      ;Send a command, like 03 (LCD &amp;quot;On&amp;quot;).&lt;br /&gt;
      call LCDIsReady&lt;br /&gt;
      pop af&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Device checking&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This example also uses Port 21h.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    in a, (2)&lt;br /&gt;
      rlca ;Roll bit 7 into carry.&lt;br /&gt;
      jp nc, Regular83Plus&lt;br /&gt;
      and 40h ;Test bit 5, now rotated into bit 6.&lt;br /&gt;
      jp z, Silver83Plus&lt;br /&gt;
      in a, (21h)&lt;br /&gt;
      and 03h&lt;br /&gt;
      jp z, Regular84Plus&lt;br /&gt;
      jp nz, Silver84Plus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
{{lowercase}}&lt;br /&gt;
[[Category:Z80 Assembly]]&lt;br /&gt;
[[Category:Z80 Heaven]]&lt;br /&gt;
[[Category:Z80 Ports]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>