OSI CA-14? CA-15V universal telephone interface logical interface determined from software Contains 2 6821 PIA, Tone generator, Tone decoder, Tape control, input/output multiplexer for Tape/Aux/Phone/Votrax, 300baud modem PIA#1 $F800 PortA Bit 0 out votrax output to phone enable 01 tone gen output 05 Bit 1 out aux output to phone enable 02 pulse gen output 06 ??? Bit 2 out modem output to phone enable 04 disable output 07 Bit 3 in Bit 4 in Bit 5 in Bit 6 in Bit 7 in ring detect (DDRA = 0x07) PortB $F802 Bit 0 out 1\ = offhook 0\ = onhook 1\ Bit 1 out 0/ 1/ 1/ Bit 2 out tape play control 0=on 1=off Bit 3 out tape recoder control 0=on 1=off Bit 4 in Bit 5 out failsafe toggle 0->1->0 disarms failsafe for some amount of time Bit 6 in failsafe disconnect 0 indicates disconnect Bit 7 in tone detected when set (DTMF or dial or busy etc.) (DDRB = 0x2F) PIA#2 $F804 PortA Bit 0 in DTMF tone decoder input bits? Bit 1 in DTMF tone decoder input bits Bit 2 in DTMF tone decoder input bits Bit 3 in DTMF tone decoder input bits Bit 4 in Bit 5 out 1\ Bit 6 out 1- = modem auto answer Bit 7 out 1/ (DDRA = 0xE0) CRA $F805 Bit 7 CA1 active transition flag. 1= 0->1, 0= 1->0 (goes hi on transition, cleared by read of ctrl reg) used to detect tone/no tone transition ??? PortB $F806 (DTMF output select) FF=off when bit=0 - enable tone Bit 0 out 0=697Hz D7="0" DE="2" ED="4" BD="6" DB="8" Bit 1 out 0=770Hz EE="1" BE="3" DD="5" EB="7" BB="9" Bit 2 out 0=852Hz Bit 3 out 0=941Hz DTMF keypad and frequency lsb Bit 4 out 0=1209Hz 1 2 3 A - 697Hz (E) Bit 5 out 0=1336Hz 4 5 6 B - 770 (D) Bit 6 out 0=1477Hz 7 8 9 C - 852 (B) Bit 7 out 0=1663Hz * 0 # D - 941 (7) (DDRB = 0xFF) 1209 1336 1477 1663Hz (msb)(E) (D) (B) (7?) lower 4 bits select row tone, upper 4 bits select column tone for DTMF F808(R) modem status Bit 0 1 = recv ready Bit 1 1 = xmit busy Bit 2 1 = modem error Bit 3 1 = modem in use Bit 4 Bit 5 Bit 6 Bit 7 1 = modem ready F808(W) modem control 0x67 = turn off modem 0x03 0x11 = enable modem F809(R) modem data read F809(W) modem data send Initialize modem Write F808 $43, wait 10*10ms, $03, wait 300*10ms, $11, wait 400*10 ms, Read F808 & 08 = 1 Modem in use something at $CD00 (hi bit set = busy?) maybe Votrax? Modem Auto answer, write 0xE0 to $F804 , initalize modem 2 PIA ports configuration Set DDR->$F800=7, F802=2F, F804=E0, F806=FF $F802 = 0E = hangup , wait until $F802 = 0x0E $F802 = 0D = offhook $F806 = DTMF generation $FF=off $F804 = 0xE0 = auto answer $F804 = 0x60, wait 500ms, 0x40 = reset modem? modem loopback? $F808 0x08 = RING Ring Detect $F808 = 0x43, wait 40ms, F808=0x11 when $F800 & $80 = 1, ring detected Failsafe probe //F802 bit $20 is failsafe bit, toggle to 1 then 0 to indicate running X=$F802; $F802=X | 0x20; $F802 = X & 0xDF; Failsafe disconnect $F800 & 0x40 = 0 indicates disconnect Tape recorder On X = $F802; $F802 = X & $F7 Tape recorder Off //$F802 bit $08 is tape recorder control. 0=ON 1 = OFF X = $F800; $F800 = X | 0x08 Tape Play On $F800 = 3; X=$F802; $F802 = X & 0xFB Tape Play Off //$F802 bit $04 is tape play control. 0= on, 1 = off $F800 = 7; X=$F802; $F802 = X | 4; Dial tone detect $F802 bit $80 = tone detected when set Votrax to phone enable $F800 = 1 Aux to Phone $F800 = 2 Modem output enable $F800 = 4 Disable output to phone $F800 = 7