Knowledge Base

This instruction results in 0 bytes of data being sent to the peripheral. This would be used either to send a simple command to the peripheral or to elicit a true/false response.

There are 128 command codes available with this instruction. Code 127 is reserved for a special purpose. That leaves codes 0-126 (127 possibilities).

This instruction is designed to provide simple trigger commands or on/off commands. For example, it could be used to provide on/off commands to up to 63 bits of output on a peripheral.

The peripheral will respond with a True or a False. This will be saved in U(0). This gives the possibility of polling up to 127 inputs or internal on/off semaphores in a peripheral.

Remember that it is entirely a function of the peripheral how it reacts to a command, and likewise the significance of the True/False response is a function of the peripheral. For example, in one peripheral the command may cause it to start a machine, while in another it may simply want it to report its state of readiness.

The instruction SPxCmd0 127,aaaa (i.e. with cc=127) has a special function. It is used as an “Are you there?” poll to peripheral aaaa. The peripheral must respond by sending back a True value, which is saved in U(0). If no peripheral responds, U(0) will be set to False. All other cases of a peripheral not responding to an SPx instruction result in a fatal run-rime error and full reset, i.e. the SPLat processor will turn off all outputs and start executing its program from the start.

This is a low-level instruction associated with the SPLat Expansion Framework. You will most likely never need to know how to use it.

See also Error handling in SPx transfer instructions