86:Ports:07
From WikiTI
Synopsis
Port Number: 07h
Function: Link Port
This port controls the calculator's serial link port. It is a GPIO port that is wired to open-collector drivers connected to the jack's tip & ring, with the sleeve connected to ground.
Read Values
- Bit 0: Tip (red wire) state.
- Bit 1: Ring (white wire) state.
- Bit 2-3: Reads last value written.
- Bit 4-7: Unused.
Write Values
- Bit 0: Unused if bit 4 is 0. Should be set to 0 if bits 2 & 4 are both set to 1.
- Bit 1: Unused if bit 5 is 0. Should be set to 0 if bits 3 & 5 are both set to 1.
- Bit 2: Set 0 to let other device control the tip. Set 1 to pull the tip voltage low.
- Bit 3: Set 0 to let other device control the ring. Set 1 to pull the ring voltage low.
- Bit 4: Set 0 to configure bit 0 for input. Set 1 to configure bit 0 for output. This is always set to the same value as bit 2 by the OS, but always 0 has the same effect.
- Bit 5: Set 0 to configure bit 1 for input. Set 1 to configure bit 1 for output. This is always set to the same value as bit 3 by the OS, but always 0 has the same effect.
- Bit 6-7: Controls direction for bits 2-3. Should always be set to 1 (output).
Comments
- Be sure to set this port to C0h before using OS functions that check the link (including getKey) & before returning to the OS, or it will be confused by what it sees as a silent link attempt.
- While the TI-86 uses 5 V as its high level, linking with suitably-designed 3.3 V open-collector circuitry (such as in TI's 68K-based calculators) also works.