Apple IIGS: Changing settings of the serial ports



Changing the software settings of the serial ports for either data format of
parity disables buffering, often used during access of bulletin boards. If a
program changes the settings for Data Format (bits per character) or Parity,
the program should re-enable buffering.

To change through software the baud rate from 1200 to 300 on the serial
port, use nnB, the command in the Technical Introduction to the Apple IIGS,
Page 35. The baud rate change will not show up in the control panel. The
control panel displays the settings that are saved in firmware.

If you are using the Printer port, the control character is a Control-I. If
you are using the modem port, the control character is a Control-A. Use the
following numbers for the baud rates.

 n Baud Rate

 0 Default (as set in Control Panel)
 1     50
 2     75
 3    110
 4    134.5
 5    150
 6    300
 7    600
 8   1200
 9   1800
10   2400
11   3600
12   4800
13   7200
14   9600
15 19,200

For example, the following program changes the baud rate from 1200 to 300

under software control.

10 D$=CHR$(4):I$=CHR$(1)
20 PRINT D$;"PR#2"
30 PRINT I$;"8B": REM ENSURE 1200 BAUD
40 PRINT"This is a test of 1200 Baud"
50 PRINT I$;"6B": REM SET UP 300 BAUD
60 PRINT" This is a test of 300 Baud"
70 PRINT D$;"PR#0"
80 END

To verify that the baud rate is changing, run this program after connecting
another system to the modem port. Depending on the baud rate for that
receiving system, one of the sentences sent will not be legible.


Published Date: Feb 19, 2012