Re: control of 83 link port


[Prev][Next][Index][Thread]

Re: control of 83 link port



Post the source or e-mail it to me and I might be of help.

Grant

>This is the routine I was trying to use.  The LCD turns off and the calc
>hangs when I do this.  Anybody know why or how to fix it?
>---
>Andy Johnson
>
>On Fri, 7 Nov 1997 17:58:22 -0700 Grant Stockly <gussie@ALASKA.NET>
>writes:
>>This has info on setting data lines high.  Hope it helps!
>>Grant Stockly
>>gussie@alaska.net
>>
>>        TI83 LINK PORT
>>        --------------
>>
>>        This brief look at the TI-83 link port shows how to access
>>        the port and use it for basic sending and receiving of bytes
>>of
>>        data.
>>
>>        The TI-83 link port uses 2 data lines, D0 & D1, for
>>communicating.
>>        These data lines are accessed through the B-port of the Z80.
>>        The symbol BPORT is equated to the correct port value in
>>        the include file "TI83ASM.INC".
>>
>>        Note :  THE DATA LINES ARE READ IN AS HIGH (1) WHEN NO
>>                ACTIVITY IS PRESENT ON THE DATA LINES.
>>
>>                THE LOWER 2 BITS OF THE B-PORT, BITS 0 AND 1, ARE FOR
>>                WRITING TO THE DATA LINES.
>>
>>                BITS 2 AND 3 OF THE B-PORT ARE FOR READING IN THE
>>STATUS
>>                OF THE DATA LINES.
>>
>>
>>        Reading the data lines :
>>
>>
>>                IN      A,(BPORT)       ; READ THE VALUE OF THE B-PORT
>>                CP      0Ch             ; ANY DATA LINE GO LOW ?
>>                JR      Z,NO_ACTIVITY   ; IF READ 0Ch THEN NO LINES
>>LOW
>>
>>                CP      8               ; IS D0 PULLED LOW ?
>>                JR      Z,D0_LOW        ; YES, BIT 2 = 0 SO D0 IS LOW
>>NOW
>>               ;
>>               ; ELSE BIT 3 WAS LOW (ACC=4), SO D1 IS LOW
>>               ;
>>
>>
>>        Writing to the data lines :
>>
>>                There are symbols equated to the correct values
>>                to "OUT" to the B-PORT for controlling the
>>                status of the data lines.
>>
>>                LD      A,D0LD1L
>>                OUT     (BPORT),A    ; is used for setting D0 low, D1
>>low
>>
>>                LD      A,D0LD1H
>>                OUT     (BPORT),A    ; is used for setting D0 low, D1
>>high
>>
>>                LD      A,D0HD1L
>>                OUT     (BPORT),A    ; is used for setting D0 high, D1
>>low
>>
>>                LD      A,D0HD1H
>>                OUT     (BPORT),A    ; is used for setting D0 high, D1
>>high
>>
>>
>>        A few of the TI-83 system routines concerning the link port
>>        are availble for ASM use. These routines are accessed by
>>making
>>        a call to the routine _IO_EXEC, with a value stored in the
>>        byte at ASM_IND_CALL (80C8h).
>>
>>        _IO_EXEC = 51EFh
>>
>>        D0LD1L      EQU              0C3h
>>        D0LD1H      EQU              0C1h
>>        D0HD1L      EQU              0C2h
>>        D0HD1H      EQU              0C0h
>>        BPORT       EQU              0
>>
>>
>>
>>        ASM_IND_VALUE
>>        -------------
>>
>>            19d         REC1STBYTE : This routine goes into idle
>>                                     or low power mode and waits for
>>                                     the data lines to change. Then
>>                                     reads a byte of data using the
>>TI-83
>>                                     bit protocol. This only reads the
>>1st
>>                                     byte of data. The byte is
>>returned
>>                                     in the accumlator.
>>
>>            20d         REC1STBYTENC : The same as REC1STBYTE except
>>                                       that the cursor does not flash.
>>                                       The byte is returned in the
>>                                       accumulator.
>>
>>            22d         RECABYTE     : This routine looks at the data
>>                                       lines for activity for about
>>                                       2 seconds and reads in a single
>>                                       byte of data. If no data is
>>found
>>                                       an error will be generated.
>>                                       The byte is returned in the
>>                                       accumulator.
>>
>>            11d         SENDABYTE    : This routine sends a byte of
>>                                       data across the data lines
>>                                       using the TI-83 bit protocol.
>>If
>>                                       there is no response within
>>about 2
>>                                       seconds an error is generated.
>>                                       The data to be sent needs to be
>>in
>>                                       the accumulator.
>>
>>
>>>I need to set the output of the link port on the 83 to both lines
>>high.
>>>I've tried using the routines for the 82, but this just causes the
>>LCD to
>>>go blank and the calc to freeze.  Reading the lines works fine
>>however.
>>>Anybody able to help me with this?
>>>---
>>>Andy Johnson
>>