CONFIGURE
Syntax CONFIGURE channel word
 
Explanation CONFIGURE is used to set the configuration for an open serial port. The first input is the channel number to configure, and the second input is a word describing what to configure. This word actually consists of several possible settings, while each of the settings is separated by a comma. A valid setting would f. ex. be "|baud=9600,parity=o,handshake=x|.

When Logo opens a port, its uses the following default settings:

baud=9600,data=1,parity=n,timeout=5000,handshake=off,binary=n

The following settings are possible:

baud 300 to 256000 The baud rate. This is the number of bits per second. The Macintosh permits baud rates of up to 230000, while Windows allows for settings of up to 256000.
data 5 to 8 The number of bits per byte.
stop 0 to 2 The number of stop bits (1, 1 1/2 or 2).
parity o, e, or n The parity (odd, even or none).
handshake on, off or x The handshakeing protocol (on, off (CTS/RTS) or XOn/XOff).
timeout   The time to wait for an I/O request in milliseconds. If this time elapses while Logo is waiting for mor bytes to be transmitted or received, Logo THROWs an I/O error.
binary y or n Binary mode (yes or n).

 

Examples MAKE "CHAN OPEN.PORT "MODEM
CONFIGURE :CHAN "|baud=9600|
(PRINTQUOTE "HELLO :CHAN)
CLOSE :CHAN

TopIndex