DOCUMENTATION FOR TDD v.2 Ronald E. Friedrich, c/o John of Beverley Chapel for the Deaf, 7611 Park Lane, Dallas, Texas 75225. (Correspondence is welcome.) DESCRIPTION: Use your Kaypro II as a Telecommuncations Device for the Deaf (Baudot TTY). FEATURES: -TDD send/receive -Autodialer (stores up to 26 phone numbers). -Manual dialer (Dial from the blue keypad). -Send pre-typed message of ANY length. -Save your TDD conversations on disk file. HOOKUP To use this program you need an acoustic coupler designed for Deaf TTYs. If you do not already own one, ask a deaf friend for the name of your local deaf TTY agent. Second hand couplers may also be available in some areas. Other sources of couplers are: Phone-TTY, Inc. Ultratec 14-25 Plaza Rd. P.O. Box 4062 Fair Lawn, NJ 07410 Madison, WI 53711 NOTE: Computer modems will NOT work for deaf TTY purposes. The coupler must be interfaced to the Kaypro parallel printer port. I have provided schematics for two interface circuits depending on the type of coupler you use. The interface circuits require no extra power supply. The interface includes an optional 12-volt relay for the autodial feature of the program. The "normally closed" contacts of the relay should be wired in series with the telephone line. The relay BREAKS the phone circuit, simulating rotary dial pulses. The dialer will work on all rotary or touch tone phone systems. --------------------------------------------------------- This Kaypro-to-coupler interface presumes common ground on coupler jacks, +voltage on pins of both "keyboard" and "printer" jacks. All transistors (marked 'EBC') are NPN (2N2222 or equiv) silicon switching transistors. Kaypro II +----\/\/\/\---------+ Parallel | 100K | to coupler "Keyboard" jack Port (J2) | B /C----+------------------o------------ (+v) pin 2-----+--\/\/\/\---|< o------- (TDD send) 1K \E |gnd | gnd to coupler pin 11-----------C\ B "magnet/printer" jack (TDD rcv) >|------\/\/\/\---------+-----o------------ (+12v) E/ 1K | o------- |gnd 1N914 | | 200 ohm Diode | gnd gnd------)|--+--\/\/\/\----|<----+ 100mf | | n---->c relay contacts (nc) in series with | : o phone line +--+---+ : | )|| | )|| 12v relay | )|| +--|<--+ diode (1N4000 series) | 1K B /C pin 4-------/\/\/\/-----|< (dial) \E | pins 19-30---gnd gnd (gnd) =================================================================== This Kaypro-to-coupler interface presumes common ground on coupler jacks, +voltage on pin of "keyboard" jack and -12 volts on pin of "printer" jack. Unless otherwise marked, all transistors (labeled 'EBC') are NPN (2N2222 or equiv) silicon switching transistors, resistors are 1000-ohms, and diodes are 1N914. 100K Kaypro II +------\/\/\/\----+ Parallel | | to coupler "Keyboard" jack Port (J2) | B /C---+------------------o------------ (+v) pin 2------++-\/\/\/\--|< o------- (TDD send) | \E | | | gnd | gnd | Relay contacts (nc) in series | c<----n with phone line | o : | : +--------+ | 12v ||( | +--------------------+ relay||( | | ||( | B /E +--->|---+ Diode (1N4000 B /C--\/\/\/\--||--+--\/\/\/\---->|--------+-o------------ (-12v) | o------- | | pin 11-----------------+ gnd (TDD rcv) pins 19-30-----gnd (gnd) ************************************************************* Next you need to connect your interface box... 1) To the acoustic coupler: Insert the two plugs in the appropriate jacks in back of the coupler. 2) To the phone line: (optional) This connection is for the dialer only. It is not necessary to make this hookup to use the computer as a TTY. Your phone wiring looks like this: ______ O O Telephone / \ ------ || || wall terminal block || / |+----o------------------------------------- +-----o------------------------------------- red & green wires (ignore black & yellow) The computer dialer should be connected in series with the phone. This means you must disconnect ONE of the phone wires (it does not matter which: either red or green), and connect the two sides of the open circuit to the normally closed contacts of the relay in your interface box. (See below.) You can use light-gauge speaker wire for that hook up. ______ O O / \ ------ || || wall terminal block || / |+----o------------------------------------ +-----o +---------------------------------- | | \disconnect this wire from the phone. | | __|_|__ | O O | |_____|interface box This connection may be semi-permanent. It will not interfere with the normal operation of the telephone. 3) To the Computer: The computer cable plugs into the parallel printer port in back of the Kaypro. Obviously, you must first disconnect your printer. The start-up procedure I recommend is: a) Load the TDD program. b) While that is going on, remove your printer plug and instert the TDD interface plug. c) Insert the phone into the coupler cradle. ************************************************************** OPERATION When you load TDD.COM into the computer it automatically starts up in the TDD (send/receive) mode. If the coupler is plugged in and turned on, you will hear beeps as you type, and see what you type displayed in capital letters. The program runs just like a C-PHONE. It automatically generates a at the end of each line. You can also manually send by hitting the key. And you can manually send a bare by hitting either the key or down-arrow. ,, and left-arrow all function as a TDD back space. You never need to worry about shifting between and because that is all handled automatically. However, if the shift mechanism gets confused while receiving (as can happen with any TDD), you can manually set by hitting the up-arrow, and by hitting the right-arrow. ************************************************ When you hit ESC you will be presented a SPECIAL FUNCTIONS menu: D> DIALER When you select the DIALER function, you will be presented with a record of names of people whose phone numbers you have stored in memory. The first time you do this you will get a blank menu list. You can load names and numbers by using the "Modify" option, as indicated on the menu (the key). Be sure there is at least 2-Kbytes of space on the TDD disk for the phone number records. When you dial a number, the computer will automatically go back to the TDD mode when finished. You can abort dialing by hitting the key. It will momemtarily hang up the phone and take you back to the dialer menu. You can exit from the dialer menu to the TDD mode by hitting . Or you can exit from the dialer menu to CP/M by hitting CTRL-C. The dialer program turns a relay on and off, simulating the switching action of a rotary dial. W> WRITE THE LAST 16K OF THE PRECEDING CONVERSATION TO DISK. If you want to keep a record of your conversation, select this function. You will be asked to enter the name of the file you want to write. The program will write everything sent and received up that point. If the conversation was very long, only the last 16K is saved. When writing is complete, the program will return to the TDD send/receive mode. You may later review your conversation with either CP/M's "TYPE" command (after exiting TDD.COM), or with your word processor. SENDING A MESSAGE: First prepare your message on a disk file using your word processor program. Don't worry about upper/lower case letters, as the TDD program will convert everything to upper case. It will also convert non-alphanumeric symbols to standard TTY "figs." Otherwise, the TDD program will send your file exactly as you typed it. It will even convert any characters to an appropriate number of spaces (only in the MESSAGE mode, not in the regular TDD mode). Save your message on file, exit the word processor, load TDD.COM, hit ESC, and select menu option: M> MESSAGE FILE NAME The computer will ask you to name the file you want to send. For the sake of time, do this function BEFORE you make your phone call. The message will not be sent yet. Rather, you will be taken back to the TDD mode when you hit return. Then when you are ready to actually send the message, hit ESC, and select menu option: S> SEND MESSAGE FILE The computer will start sending your message. To interrupt at any time simply hit any key. When the message is completed (or interrupted), you will be taken back to the TDD mode. WILL TDD.COM PRINT HARD COPY? No. The parallel printer jack is busy with the TDD send/receive and dialer operations. It cannot simultaniously handle printer data. However, you can save your conversation on disk file, exit TDD.COM, and print that file. ================================================================== TECHNICAL DATA For those who like to know such things. Telecommunication Devices for the Deaf use the 5-bit Baudot code, 45.5 Baud. (Start/data bits = 22ms; stop bit 31ms.) TDD acoustic couplers (half-duplex asyncronous send/receive) frequencies: Mark = 1400Hz, Space = 1800Hz. Telephone dial pulse rate is 10 pulses per second. Pulse shape: 58%-64% break(open). Minimum interdigit time: 600ms. [Off-hook resistence: 200 ohms, max.] There are two ways to handle the 45.5 baud in the Kaypro: 1) Modify the SIO baud rate clock. Such an approach is used by Jim Larson (Software Design, P.O. Box 2722, Boise, Idaho 83701) for his Ham (RTTY) program. 2) Drive the coupler with bare data from the PIO, incorporating carefully timed delay loops in the software. This is the approach I have chosen. Ergo, no hardware modification is needed to run this program. NOTE: This program was written for a 2.5MHz CPU clock. If your Kaypro has been modified to run a faster clock, you will need to change the delay loops via the FUNCTIONS menu (hit ESC and select option 'L'). Suggestion: If you are running a 5Hz clock, double the delay loop values. Don't be afraid to play with it; you can easily restore timing variables to original default values. It is not necessary to use a commercially marketed coupler if you want to build a TDD modem with available PLL and VCO chips. The parallel printer jack carries the following data: Pin 2 (ASCII bit 0): TTY serial data OUT Start bit: low Stop bit: high Pin 4 (ASCII bit 2): DIAL serial data OUT Off-hook (make): low On-hook (break): high Pin 11 (handshake line): TTY serial data IN [system port bit 3] Start bit: high stop bit: low The obvious discrepancy in TTY I/O logic was chosen to simplify interfacing with available couplers. ================================================================ Daryl, Here is more on the design of the program, which I did not include in the original DOC file for the sake of space. The program initially shuts off the disk drive motors, sends a "silence key click" command to the keyboard, and sets the data-out bit high (to quiet the coupler while it...) sets up the ASCII/BAUDOT conversion tables. When that is done, it tests the data-in bit to see if the coupler interface is connected (bit is low). If the port is open (bit is high), you will get a prompt to connect the coupler. Note that the program may give you the "ready" prompt if you have a parallel printer attached to the port and the printer is off. The heart of the program is a loop which alternately tests the keyboard and data-in bit. If a signal in is detected (bit goes high), then it goes into the receive routine. The program samples the bit at five timed intervals, converts those five bits to single binary number, looks it up on the tdd-to-ascii conversion table, prints it, and stores it in the "save" buffer. If keyboard data is detected, the program checks for an ESC character, which will call the special functions menu. Otherwise, the character is looked up on the ASCII-to-TDD table (the printable equivalent is also in the table; i.e. all capital letters, tdd printable characters). The individual bits of the tdd character are fed sequencially to the data-out bit, with timed delay loops. Since we all know that one can usually type faster than 45.5 baud, a "type ahead" feature is included in the send routine. The keyboard is sampled at the beginning of every bit transmission, and the data is temporarily stuffed in the "key-in" buffer. During the transmission of the stop bit, the program scans the key-in buffer, and transfers good data to 256-byte type-ahead buffer, and prints it on the screen. Before the program checks for received data again, it checks the type-ahead buffer. If there is untransmitted data there, it will transmit the next waiting byte, still checking the keyboard, and adding data to the type-ahead buffer, if necessary. Once the send routine has emptied the type-ahead buffer, then it will sample received data. Note that the type-ahead buffer is a loop buffer. There are two byte counters: BUFFIN and BUFFOUT. BUFFIN - BUFFOUT = the number of unsent bytes in the buffer. Because both of these byte counters are single byte variables, they will automatically loop to zero after 255. There is also a byte count variable for line length, which will automatically generate a CR-LF when one is necessary. Note that all my chatter before about port and bit assignments relate to the fact that many of my commands are HARDWARE specific. In other words, I'm reading and setting specific bits at specific chips as designated by the hardware port assignments (as I got them from the hardware schematic), not by CP/M's BDOS and BIOS memory locations.