Once installed on a SPLat controller, the SPice10205 appears as several regular analog and digital I/O points. The following table shows the mappings for all the I/O on the board.
| pin | SL99 | MMi200 | MS12 | ||
|---|---|---|---|---|---|
| Conductivity 1 | 7 | Input 10 | Input 13 | Input 20 | |
| Conductivity 2 | 8 | Input 11 | Input 14 | Input 21 | |
| Conductivity 3 | 4 | Input 12 | Input 15 | Input 17 | |
| Conductivity 4 | 5 | Input 13 | Input 16 | Input 18 | |
| Conductivity 5 | 6 | Input 14 | Input 17 | Input 19 | |
| Conductivity 6 | 9 | Input 15 | Input 18 | Input 22 |
Because the pins of the SPice connector, to which the SPice10205 is connected, can be configured for different functions (analog/digital, input/output), you need to have some code in your program that configures them to the correct settings for the SPice10205.
The following section of code should be run by your program just once, at the beginning, before your program attempts to do anything else with the SPice10205.
Use this code if you are using all 6 channels for conductivity
ClrU
setu 0,2 ;set spice connector pin 4 as digital input
setu 1,2 ;set spice connector pin 5 as digital input
setu 2,2 ;set spice connector pin 6 as digital input
setu 3,2 ;set spice connector pin 7 as digital input
setu 4,2 ;set spice connector pin 8 as digital input
setu 5,2 ;set spice connector pin 9 as digital input
SpiceConfigU
If you are using the thermistor drive voltage generator, channels 6 of the SPice10205 cannot be used. Instead you need to remove the jumper on the SPice10205 board and use the following initialization code:
ClrU
setu 0,2 ;set spice connector pin 4 as digital input
setu 1,2 ;set spice connector pin 5 as digital input
setu 2,2 ;set spice connector pin 6 as digital input
setu 3,2 ;set spice connector pin 7 as digital input
setu 4,2 ;set spice connector pin 8 as digital input
setu 5,4 ;set spice connector pin 9 as analog output
SpiceConfigU
Once the board has been initialized, the fluid sensor inputs are just like any other input. The input will be on when there is fluid present.
Note that during debug with SPLat the SPice board may not show up correctly in the I/O window unless the board has run the initialize code. You can fix this by translating and running the above initialization sequence in the board. Add a line
a goto a
at the end to prevent translation and runtime errors.