Selecting a Switch
Four bits are used to control each switch backlight. The bits are shifted by SCP1 and Din1. The first bit shifted is
for red backlight, the second bit shifted is for green backlight, the third bit shifted is for blue backlight, and the
fourth bit shifted is a dummy bit. The last 4 bits shifted are for switch #1. Once all the backlight data is shifted,
the LP1 is taken high and then low. A bit=0 turns the backlight ON state and a bit=1 turns the backlight OFF
state. The LED Disable must be low for the backlight to go into effect. The LED Disable can be used for
brightness control and disabling/enabling the backlights.
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.