CPU: I/O configuration
The instruction
SPxChIn 0,!CPU
will return the board’s I/O configuration in U. This will vary with different numbers of XPice expansion boards connected. The items returned are:
| U0 | Number of digital inputs |
| U1 | Number of digital outputs |
| U2 | Number of analog inputs |
| U3 | Number of analog outputs |
Note that, in general, the numbers returned are the maxima for each type of resource. Pins on SPice connectors are configurable to more than one type of I/O. Each such configurable pin will be included in each of the possible of the above counts.
Example:
An SL99 without any expansion boards connected will return the numbers
| U0=16 | Number of digital inputs |
| U1=14 | Number of digital outputs |
| U2=5 | Number of analog inputs |
| U3=3 | Number of analog outputs |
- The 14 inputs are 8 external inputs on the base board, 2 option links that appear as inputs and 6 SPice pins that can be configured as inputs.
- The 14 outputs are 8 external outputs on the base board plus 6 SPice pins that can be configured as outputs.
- The 5 analog inputs are 1 provided on the base board plus 4 SPice pins that can be configured as analog inputs.
- The 3 analog outputs are 1 provided on the base board plus 2 SPice pins that can be configured as analog outputs. Of the latter 2, one (Analog output G) is also the thermistor excitation voltage.