Knowledge Base

# 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
ParameterOptionDescription
BaudRateMandatoryThe baudrate to be used. Legal values are300600120024004800960019200384005760076800115200230400 (ARM boards only)460800 (ARM boards only)
BitsMandatoryThe number of data bits in each character. Legal values are 7 and 8.
ParityMandatoryn = 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 )