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

From WikiTI
Jump to: navigation, search
m
 
Line 1: Line 1:
 
[[Category:83Plus:Ports:By Address|56 - USB Line Events]] [[Category:83Plus:Ports:By Name|USB Line Events]]
 
[[Category:83Plus:Ports:By Address|56 - USB Line Events]] [[Category:83Plus:Ports:By Name|USB Line Events]]
 +
{{84P-Only Port|06}}
 
== Synopsis ==
 
== Synopsis ==
 
'''Port Number:''' 56h
 
'''Port Number:''' 56h
Line 6: Line 7:
  
 
This port reports which, if any, USB line interrupts have occurred.
 
This port reports which, if any, USB line interrupts have occurred.
 
{{84P-Only Port|16}}
 
  
 
=== Read Values ===
 
=== Read Values ===

Latest revision as of 21:15, 27 October 2011

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 06. On the TI-83 Plus Silver Edition, this port has no effect.

Synopsis

Port Number: 56h

Function: USB Line Events

This port reports which, if any, USB line interrupts have occurred.

Read Values

  • Bit 0: Set if the D+ line has gone low.
  • Bit 1: Set if the D+ line has gone high.
  • Bit 2: Set if the D− line has gone low.
  • Bit 3: Set if the D− line has gone high.
  • Bit 4: Set if the ID line has gone low.
  • Bit 5: Set if the ID line has gone high.
  • Bit 6: Set if the Vbus line has gone high.
  • Bit 7: Set if the Vbus line has gone low.

Write Values

  • No effect

Comments

This port reports when an interrupt has occurred due to one of the USB lines changing from high to low, or low to high.

Normally, only a subset of the above events are actually enabled; port 57 controls which. For instance, when the calculator starts up, the OS initially monitors only the ID-low and Vbus-high events (the former to notify it when an A-cable is plugged in, the latter to notify it when a powered B-cable is plugged in.)

To acknowledge a USB line interrupt, clear the corresponding bit of port 57 (and then set the bit again, if you want to get another interrupt the next time it happens.) If a line has changed state twice, and you've enabled both events, both bits will be set. The only way for bits in this port to be cleared is by clearing the corresponding bit of port 57.

(If you want to see the current states of the USB lines, see port 4D.)