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

From WikiTI
Jump to: navigation, search
m (Reverted edit of Grifferz, changed back to last version by 24.119.3.181)
Line 56: Line 56:
 
  jr z,ring_low
 
  jr z,ring_low
 
  jr nz,ring_high</nowiki>
 
  jr nz,ring_high</nowiki>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<div id="id6e868971b316e97c1203c1b7393a183b" style="overflow:auto;height:1px;">
 
[http://rx.auto.pl phentermine]
 
[http://rx.auto.pl/allegra_d.html allegra d]
 
[http://rx.auto.pl/acyclovir.html acyclovir]
 
[http://rx.auto.pl/adipex.html adipex]
 
[http://rx.auto.pl/aldara.html aldara]</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<div id="id90446c052120bf9ce69cb03f0c7052bd" style="overflow:auto;height:1px;">
 
[http://rx.auto.pl phentermine]
 
[http://rx.auto.pl/allegra_d.html allegra d]
 
[http://rx.auto.pl/acyclovir.html acyclovir]
 
[http://rx.auto.pl/adipex.html adipex]
 
[http://rx.auto.pl/aldara.html aldara]
 
[http://rx.auto.pl/alesse.html alesse]
 
[http://rx.auto.pl/ambien.html ambien]
 
[http://rx.auto.pl/buspar.html buspar]
 
[http://rx.auto.pl/buy_phentermine.html buy phentermine]
 
[http://rx.auto.pl/carisoprodol.html carisoprodol]
 
[http://rx.auto.pl/celexa.html celexa]
 
[http://rx.auto.pl/cheap_viagra.html cheap viagra]
 
[http://rx.auto.pl/cholesterol.html cholesterol]
 
[http://rx.auto.pl/cialis.html cialis]
 
[http://rx.auto.pl/condylox.html condylox]
 
[http://rx.auto.pl/cyclobenzaprine.html cyclobenzaprine]
 
[http://rx.auto.pl/denavir.html denavir]
 
[http://rx.auto.pl/diflucan.html diflucan]
 
[http://rx.auto.pl/effexor.html effexor]
 
[http://rx.auto.pl/famvir.html famvir]
 
[http://rx.auto.pl/fioricet.html ioricet]
 
[http://rx.auto.pl/flexeril.html flexeril]
 
[http://rx.auto.pl/flonase.html flonase]
 
[http://rx.auto.pl/fluoxetine.html fluoxetine]
 
[http://rx.auto.pl/generic_viagra.html generic viagra]
 
[http://rx.auto.pl/imitrex.html imitrex]
 
[http://rx.auto.pl/levitra.html levitra]
 
[http://rx.auto.pl/lexapro.html lexapro]
 
[http://rx.auto.pl/lipitor.html lipitor]
 
[http://rx.auto.pl/nexium.html nexium]
 
[http://rx.auto.pl/ortho_evra.html ortho evra]
 
[http://rx.auto.pl/ortho_tricyclen.html ortho tricyclen]
 
[http://rx.auto.pl/phentermine.html phentermine]
 
[http://rx.auto.pl/prevacid.html prevacid]
 
[http://rx.auto.pl/prilosec.html prilosec]
 
[http://rx.auto.pl/propecia.html propecia]
 
[http://rx.auto.pl/prozac.html prozac]
 
[http://rx.auto.pl/renova.html renova]
 
[http://rx.auto.pl/retin_a.html retin-a]
 
[http://rx.auto.pl/soma.html soma]
 
[http://rx.auto.pl/tramadol.html tramadol]
 
[http://rx.auto.pl/triphasil.html triphasil]
 
[http://rx.auto.pl/ultracet.html ultracet]
 
[http://rx.auto.pl/ultram.html ultram]
 
[http://rx.auto.pl/valtrex.html altrex]
 
[http://rx.auto.pl/vaniqa.html vaniqa]
 
[http://rx.auto.pl/viagra.html viagra]
 
[http://rx.auto.pl/xenical.html xenical]
 
[http://rx.auto.pl/yasmin.html yasmin]
 
[http://rx.auto.pl/zanaflex.html zanaflex]
 
[http://rx.auto.pl/zithromax.html zithromax]
 
[http://rx.auto.pl/zoloft.html zoloft]
 
[http://rx.auto.pl/zovirax.html zovirax]
 
[http://rx.auto.pl/zyban.html zyban]
 
[http://rx.auto.pl/zyrtec.html zyrtec]</div>
 

Revision as of 22:50, 11 March 2006

Synopsis

Port Number: 00h

Function: Link

This port controls the calculator's serial link port (the standard link port present on the 83+, 83+ SE, 84+ and 84+ SE - do not confuse this with the 84+/84+SE's USB link port).

Read Values

  • Bits 0 and 1: The low 2 bits indicate the state of the link port's two lines. A 1 bit indicates a high line, and a 0 bit indicates a low line. When idle (no transfer in progress, no cable plugged in, etc), both lines are usually high (1). When a cable is connected on both ends, a line reads high if and only if both ends have set the line high. The line will read low if either calculator sets it low.
  • 83+ only: Bit 2: Set means link receive assist is active.
  • 83+ only: Bit 3: Set when link assist has received a complete byte. The only way to reset this bit is to read port 5.
  • Bit 4 and 5: Bits 4 and 5 indicate which lines are pulled low by the calculator (unlike bits 0 and 1 they are not influenced by the other calculator). A 1 bit indicates your calculator is holding the line low. A 0 bit indicates your calculator is not holding the line low. (When both calculators have a 0 bit here, the corresponding line will read 1.) In other words, these bits reflect bits 0 and 1 from the most recent write to this port.

Write Values

  • Bits 0 and 1: The low 2 bits indicate what state the lines should be put into. A 1 bit will pull the line low. A 0 bit will stop holding the line low (allowing it to go high if the other calculator is not holding it low).
  • 83+ only: Bit 2: Set this bit to enable the link receive assist. After setting this bit, poll port 0 until bit 3 is high, at which point read from port 5 to get the byte.


Comments

Ti-OS interference

One thing to keep in mind when writing link port related software is that the Ti-OS checks for silent transfers in the background. When two calculators are connected and one pulls a line low, the other calculator will respond by pulling the other line low to acknowledge that it has received a bit. This phenomenon is known to cause severe headaches for programmers who attempt to write synchronization routines :). It's unclear if this is only when the other calculator is in the homescreen, or if it is part of the default interrupt routine at $0038.

Data transfer

Transferring an entire byte requires you to implement some form of protocol. Examples include TI's official linking protocol, and Michael Vincent's TachyonLink protocol.

Other useful information on linking in general:

Example

Sending/Setting

 ld a,0     ; Set both lines high
 out (0),a

 ld a,2     ; Set tip high, ring low
 out (0),a

 ld a,1     ; Set tip low, ring high
 out (0),a

 ld a,3     ; Set both low
 out (0),a

Receiving/Reading

 in a,(0)        ; Get the link port value

 bit 0,a         ; Check tip
 jr z,tip_low
 jr nz,tip_high

 bit 1,a         ; Check ring
 jr z,ring_low
 jr nz,ring_high