SPLat controllers support a variety of communications protocols. This chapter describes the mechanisms for selecting which protocol is to be "in charge". Subsequent chapters provide the details of each protocol.
Current SPLat controllers have one serial communications port, which was originally intended only for programming the controller. It is not possible to operate more than one protocol on the serial port at any one time. SPLat therefore provides a mechanism for switching between protocols. The same mechanism provides control over the lower level settings like bit rate (a.k.a. baud rate) and character profiles. This "Protocol selection" chapter is about that mechanism.
The serial port on a SPLat controller is capable of sending and receiving a stream of data bit, 1's or 0's, one at a time. Several consecutive bits (typically 10) grouped together form a character. A protocol defines how those characters are to be interpreted. In effect the protocol is the language used for communications between the SPLat and say a computer.
In a typical protocol information is exchanged in the form of messages or datagrams. A datagram consists of a discrete collection of characters, transmitted in sequence, that as a whole convey a particular meaning, command or item of data. A datagram usually also contains some form of error detection, so a corrupted datagram can be detected and retransmitted. The details vary from protocol to protocol. The terminology can also vary from protocol to protocol. For example, in the ModBus protocol the datagrams are normally called queries and responses.
There tends to be some confusion and mis-information about what constitutes a protocol. These mistakes can lead to serious misunderstandings and ultimately costly mistakes.