SPLat Logo

# User(BaudRate, Bits, Parity) hash function

NOTICE: Our web site is being updated, but is currently experiencing extreme slowness due to host issues. Please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map
SPLat will be shut down for the Christmas Holiday season from Friday 20 December 2024 through Tuesday 7 January 2025. We will check emails periodically and will continue to process orders but at a slower pace. Santa hat

# 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
BaudRate Mandatory

The baudrate to be used. Legal values are

  • 300
  • 600
  • 1200
  • 2400
  • 4800
  • 9600
  • 19200
  • 38400
  • 57600
  • 76800
  • 115200
  • 230400 (ARM boards only)
  • 460800 (ARM boards only)
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 )