SPLatco Knowledge Base

This is a special instruction associated with Touch of SPice boards.

SPiceConfigU

It is used where the SPice pins are configurable as to their functions. It uses the contents of U to configure the SPice pins. The number in U(0) configures the first pin, the number in U(1) configures the second pin etc. The values are:

0 = No change. The pin’s configuration remains unaltered

1 = Digital Output

2 = Digital Input

3 = Analog Input

4 = Analog Output or PWM output (see note below)

5 = Digital Bidirectional

6 = Counting Input

Other numbers could also apply. This mechanism is entirely a function of the individual SPLat board, so you need to refer to the documentation for the board you are using. The definition of pin numbers is also product dependent (but will not necessarily be the same as I/O numbers).

Note on configuration 4: Analog outputs on SPice boards are produced by generating an Pulse Width Modulated (PWM) logic signal in the processor and then filtering (averaging) it to give a DC analog voltage. Strictly speaking what appear on the SPice pin is therefore a PWM signal, but in many instances it will appear to the user as an analog signal once it has been processed on a SPice board.

This is a low-level instruction associated with the SPLat Expansion Framework.  It is not available on 32-bit boards prior to dialect 30, and will only be available on those few boards that implement it.