Classic Computer Magazine Archive COMPUTE! ISSUE 25 / JUNE 1982 / PAGE 10

[In reference to] Mr. R. O. Danver's request [COMPUTE! April, 1982, #23, pg. 14] for VIC-TTY interface, here are the hardware and software required to [connect] an ASR-33 TTY to a VIC: the attached interface will allow the VIC-20 to interface an ASR-33 Teletype with a two way communication capability.

The ASR-33 is assumed to have a Call Unit #6 as Teletype calls it. This model has a nine pin terminal strip on the rear for connection to the interface. Also Jack #2 also can be used as per the attached diagram.

The ASR-33 must be wired for 20ma. and full duplex. These adjustments can be done inside the unit with the service manual. Also the assumed baud rate is 110. This may be different for a model 35.

The VIC internal ACIA is set up for full duplex, 7 data bits, a space parity bit, 110 baud and two stop bits. This is more or less the standard configuration.

The interface itself is powered from the user port of the VIC and it can both send and receive. The short program is used as a demonstration to show how to use the VIC's serial capability. Kenneth Finn

Program 1.

*Note: Strap keyboard on ASR-33 for space parity.

10 REM ASR 33 TTY
15 REM FILE # > 128 FOR CR WITH LF
20 REM 163 = 2 STOP, 7 ASCII, 110 BAUD
30 REM 224 = SPACE PARITY, FULL DUPLEX
100 OPEN 129, 2, 3, CHR$(163) + CHR$(224)
110 GET #129, A$
200 REM MAIN LOOP
210 :GET B$
220 IF B$ <> "" THEN IF B$ = CHR$(13) THEN PRINT# 129, B$ ; CHR$(0) ; CHR$(0) ; CHR$(0) ; : GOTO 230
225 : IF B$ <> "" THEN PRINT # 129, B$;
230 : GET #129, C$ : IF C$ <> "" THEN PRINT #129, C$ REM ECHO
240 : PRINT B$ ; C$;
250 SR = ST : IF SR = 0 THEN 200
300 REM ERRORS
310 PRINT "ERROR" ;
320 IF SR AND 1 THEN PRINT "PARITY"
330 IF SR AND 2 THEN PRINT "FRAME"
340 IF SR AND 4 THEN PRINT "RCVR BUF FULL"
350 IF SR AND 8 THEN PRINT "BREAK"
360 IF (PEEK(37151)AND 64) = 1 THEN 360
370 CLOSE 129 : END
READY.