# User(BaudRate, Bits, Parity) hash function
This hash function sets the serial port up for use with the "user protocol". The user protocol is whatever you program yourself.
Parameters
Parameter | Option | Description |
---|---|---|
BaudRate | Mandatory | The baudrate to be used. Legal values are
|
Bits | Mandatory | The number of data bits in each character. Legal values are 7 and 8. |
Parity | Mandatory | n = none e = Even parity o = Odd parity |
You should set these to match the device you are communicating with.
Note that 7 bit communication is only legal if the parity is set to odd or even. 7-bit communication with No parity will result in an error.
Example
Open the primary serial port for user comms @ 38400 baud, 8 bits, no parity.
#Open_Serial User( 38400, 8, n )
Open the second serial port @ 9600, 8 bits, no parity:
#Open_Serial Port( 252 ) User( 9600, 8, n )