Knowledge Base

One installed on a SPLat controller, The SPice10203 appears as several regular digital inputs. When viewed from the button side, with the writing on the board the right way up, the 4 buttons are numbered from right to left (backwards). The following table shows the mappings for all the buttons:

 pinSL99MMi200MS12 
Button 17Input 10Input 13#Input 20 
Button 26Input 14*Input 17*Input 19 
Button 35Input 13*Input 16*Input 18 
Button 44Input 12*Input 15*Input 17 

# Input 13 on the MMi99 doubles duty as one of the option links. When the SPice 10203 is used, the option link is not useable and must be physically removed from the board.

* These SPice pins are by default not digital inputs. They only become inputs after they have been initialized by a running SPLatWare program (see below). Because of this, you will not be able to see them respond on your computer screen when the board is connected to SPLat/PC.

initializing the SPice connector

Because the pins of the SPice connector, to which the SPice10203 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 SPice10203.

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 SPice10203.

         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
SpiceConfigU
Program example
;Demonstration/Test of the SPice 10203
;This program works on an SL99/MMi99. The extra buttons are
;reflected on the outputs 0 to 3

;Use one or the other of the following sets of definition
;depending on which board you are using ...
Button1  iEQU         13         ;Definition for MMi99
Button2  iEQU         17         ;Definition for MMi99
Button3  iEQU         16         ;Definition for MMi99
Button4  iEQU         15         ;Definition for MMi99

;Button1  iEQU         10         ;Definition for SL99
;Button2  iEQU         14         ;Definition for SL99
;Button3  iEQU         13         ;Definition for SL99
;Button4  iEQU         12         ;Definition for SL99

Start:
         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
         SpiceConfigU

Loop:
         Input        Button1
         Output       0
         Input        Button2
         Output       1
         Input        Button3
         Output       2
         Input        Button4
         Output       3
         GoTo         Loop

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.