Format
OPENCOM(number1,number2,number3,number4,number5)
Description
This statement is used to initialize the serial port. Number1 is used to
specify the baud rate. Number2 specifies parity. Number3 specifies stop
bits. Number4 specifies bytesize, and Number5 identifies which port to
open (see the tables below). OPENCOM does not check the validity of the
values you give it.
(number1) (number2)
BAUD RATE PARITY
------+----------- ------+------------
VALUE | DESCRIPTION VALUE | DESCRIPTION
0 | 110 baud 0 | No Parity
1 | 150 baud 1 | Odd Parity
2 | 300 baud 3 | Even Parity
3 | 600 baud
4 | 1200 baud (number3)
5 | 2400 baud STOP BITS
6 | 4800 baud ------+------------
7 | 9600 baud VALUE | DESCRIPTION
0 | One Stop Bit
1 | Two Stop Bits
(number4) (number5)
BYTE SIZE COM PORT
------+------------ ------+------------
VALUE | DESCRIPTION VALUE | DESCRIPTION
2 | 7 Bits 0 | Com1
3 | 8 Bits 1 | Com2
Example
OPENCOM(2,0,0,3,0)
This statement would open COM1 at 300 baud, No parity, 1 Stop bit, 8 bit
bytesize.
See Also
|