Appendix i, Interface program example, Interface program example specifications – Setra System Model 470 User Manual
Page 33: Appendix i interface program example

33
Appendix I
Interface Program Example
Following is an example of interfacing the Setra 470 to an IBM or compatible PC (Personal
Computer). Although real applications for the 470 usually require more programming in special-
ized languages on different machines, the example is a simple BASIC program which shows the
important parameters to setup in the PC to allow serial communications.
10
REM SAMPLE COMMUNICATIONS PROGRAM
11
REM IBM PC SERIAL PORT TO SETRA 470
15
CLS
20
OPEN “COM1: 2400, N, 8, 1, RS, CS, DS” AS #1
30
PRINT #1, “P”;
40
INPUT #1, READING$
50
LOCATE 1,1
60
PRINT “READING:”; READING$
70
CLOSE #1
80
END
Note that the OPEN COM command in line 20 doesn’t specify values for the CS (clear to send) or
DS (data set ready) parameters, and that the RS parameter is used to suppress the request to
send signal. This is done because the Setra 470 implements a very simple subset of the RS-232
standard and does not support these handshaking signals.