SPLat Logo

Communications instructions

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

Communications instructions

The communications instructions listed here are the actual SPLat language instructions. Getting communications going also involves setting up a Communications Control Block (CCB) and possibly (depending on the protocol) a control script.

Multiple serial ports

With dialect 29 we introduced a number of communication instructions that start with an 'a'. They all allow you to specify the address of the serial port. The reason for doing this is simply that we are using processor chips that support multiple serial ports (UARTs), and want to be able to give you access to them. The a-prefixed instructions all take an additional argument, the port address.  The ii-prefixed instructions also now take a port address argument.

Port addresses are derived from the few unused 8-bit RAM addresses that exist. RAM addresses run from 0 through 249 (250 bytes). There is no RAM at 250 though 255.

The long-established programming port is located at address 251. On our older products this is an RS232-compatible serial port. On more recent 8-bit controllers (MS12x, CC18, etc) it is a serial port with 5V CMOS/TTL levels. On newer 32-bit designs some have a serial port with 3.3V CMOS/TTL levels and some (starting with the EC1) have a USB port instead. From a programming point of view these all respond to address 251.

Starting with the EC1, whose programming port at address 251 is USB, there is a second serial port available at address 252. This port uses 3.3V CMOS voltage levels but is 5V tolerant on the receive line.  Many SPLat products have additional ports as well.

Note that port address assignments are fixed in the firmware of each device: You cannot reassign the ports in SPLat.

Port assignments must be read (or copied) from the relevant I/O file for the specific controller.

Note that 32-bit controllers allow use of Modbus on multiple ports.  It has been successfully tried with Master mode on one port and Slave mode on another.

Hash commands

We introduced hash commands and hash functions to simplify certain aspects of programming SPLat. Quite a bit of this is aimed at serial communications. In effect "hash programming" gives you access to pre-written code for specific operations, using a simplified syntax and a big reduction in the number of lines of code you have to write. You should check out the available has commands before you start coding.