[A89] Re: link port


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

[A89] Re: link port




At 03:14 2001-03-12, you wrote:
>Can anyone tell me how to control the link port directly? I am trying to 
>make a sound program and have not been able to find a way to get long 
>pulses of the same frequency. I would appreciate a description of the 
>actual I/O process of the port and how sound is produced by the link 
>through the buzzer (Yes, I built one). THankX!

You controll it via a memorymapped port at adress $60000E
Here is a description of it from J89hw.txt (get the whole at 
http://alh.dhs.org/ti89/)

$60000E RW Direct link port access
         :7-4    - (:6 ?)
         :3      Live status of "ring" (white) (1=pulled down)
         :2      Live status of "tip" (red) (1=pulled down)
         :1      Activate (pull down) "ring" (white)
         :0      Activate (pull down) "tip" (red)
         Note:  The byte sender/receiver will be confused by direct link port
         access, it should be disabled first.  (See $60000C:6.)
         * Tip/red is pulled down first (by sender) when sending a '0'.
         * Ring/white is pulled down first (by sender) when sending a '1'.
         * The innermost ring is ground.
         * A bit is sent by activating the corresponding line ("ring" or
           "tip") and the receiver acknowledges by activating the other line.
           The sender now releases its line and finally the receiver releases
           the acknowledge.  Whole bytes are always sent, LSB first.  An
           "abort" condition (=error) is signalled by activating both lines
           at the same time for ~250us.  This handshaking allows very
           reliable communication, but it is half duplex only.
         * Use top/red for right channel and ring/white for left channel when
           generating sound.


so, set bit 6 of $60000C and you should be able to control it as you want 
via $60000E
For sound it is probably a good idea to disable all interrupts so you know 
that you are "alone" on the processor, hard to calculate delays otherwise. 
Or you use one of the interrupts for your soundroutine, but disable all 
else you do not use.
the "I/O process" is simply that you set or clear the bits and the voltage 
levels of the pins will change accordingly.
when calculating for makeing a tone, remember that a full wavelength is 
both an up and a down period...
Don't know if this actually answered your questions, but maybe a start...

///Olle





References: