SPLat Logo

32bit Controller Enhancements

NOTICE: We are updating our website. For product enquiries and orders please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

32bit Controller Enhancements

Other than early examples of the EC1 and some DIN Family controllers, SPLat 32 bit controllers are identified by their black PCBs.  These controllers add several enhancements to the SPLat VM as described below.

SPLat/PC Simulator

The SPLat/PC simulator does not support any of these enhancements.  We recommend you only use the simulator as a learning tool or to test small routines.  Full application debugging can only be performed on the controller using SPLatlink or instructions like iiPrintText to output debug information via the serial port.

Enhanced MultiTrack implementation

32 bit controllers benefit from having much more memory in the processor chip than our classic 8-bit controllers. This has allowed us to enhance MultiTrack:

PWM base frequency

The analog outputs on most 32 bit controllers are in reality pulse width modulated digital outputs. They can be filtered to produce an analog voltage. The duty cycle (percentage ON time) of the signal is proportional to the number sent to the output by an fAnOut instruction. The default frequency of the PWM signal is 40kHz. This can be changed by executing the following code:

   SetU            0,U0
SPxCmd1 0,!CPU

where U0 is taken from the following table:

U0PWM frequency
0 16kHz
1 8kHz
2 4kHz
3 2kHz
4 1kHz
5 500Hz
6 250Hz
7 125Hz
8 50Hz (RC servo)

The 50Hz frequency is particularly suitable for driving RC (hobby) servo motors. The other frequencies give a range of choices for, for example, controlling the speed of DC motors.

Modify SuperTimer 10mS clock interval per task

You can change the basic 10mS SuperTimer clock interval to some other value. Set U0 to the required value in mS and then execute a

   SPxCmd1         1,!CPU

The default interval is 10mS. Example, set the SuperTimer clock interval to 3mS:

   SetU            0,3
SPxCmd1 1,!CPU

This change will affect only the timing of the MultiTrack task that executes it.  Other tasks will continue to run at 10ms or whatever you have changed each of them to.

NVEM writes

The flash memory architecture of the processor used in 32 bit controllers is not conducive to having a SPLatWare program writing to NVEM.  Many of these controllers will have NVEM1, so check the documentation for your specific controller.  Some also have NVEM2 (RAM, up to 64KB on some boards), NVEM3 (battery-backed - where there's a battery - RAM, from 20 bytes on HMI boards to 4KB on some) and NVEM4 (Flash-based NV memory).

Serial Expansion via XwIre (SEXI)

32 bit controllers support SEXI when running as an Xwire Master.  This means any 8 bit or 32 bit Xwire slave can have its I/O mapped into the master's I/O space.  All the usual instructions will work, including Blink, Input, Off, GoIfInK, fAnIn, fAnOut, etc.  SPLat/PC will also show the additional I/O in the digital and analogue windows.