Selecting a Switch
The SS (Slave Select) of each switch is connected to the output of the latch driver. The input of the latch driver is
connected to the serial to parallel shift register. One bit is shifted for each switch using Din and CLK. The last bit
shifted will be for switch #1.
To select a switch for communication, bits should be shifted using Din and CLK, so all the switches have a high
bit, except the communication target switch, then toggle the LP of that switch that gets selected. The
communication to the switch is done via SCK and SDI. After communication to the switch is ended, all high bits
are shifted via Din and CLK for all the switches, and LP is toggled so no switch is selected.
Switch Scan
One terminal of each switch is connected to the SWRD (switch read). The output of the serial to parallel
shift register is connected to another switch terminal via a diode. Four bits are shifted for each switch using
Din and CLK. The third bit of the 4 bits shifted is used for the switch scan. The last 4 bits shifted will be for
switch #1.
Switch scan is accomplished by sending low bits via Din and CLK for all the switches except the switch being
scanned, then the SWRD is checked. If the SWRD is low, the switch is not pressed. If the SWRD is high, the
switch is pressed. The switch scans should be more than 10ms apart to prevent de-bouncing reads, and less than
80ms to prevent missing a read.