Connecting the switches will seem more complex than the rest of the circuit only because there are four switches needed. I have used push button MOM switches (momentary on). You can use DIP switches (dual inline pin), MOM, or whatever you have available. If the pins for the switches will not fit in your prototyping board, just solder lead wires from the switch and insert the lead wires in the correct positions. The schematic for the final portion of the circuit is shown in figure 8.9.
Figure 8.9
Insert your four switches. Space them in a manner to allow you to push the buttons without interfering with other portions of the circuit.
Figure 8.10
Insert the first two jumpers from the switches to the horizontal ground circuit as shown in figure 8.11.
Figure 8.11
Insert the two ground jumpers for the remaining two switches.
Figure 8.12
Install a jumper wire from PortB.2 (pin 3) to the open circuit next to your first switch as shown in figure 8.13.
Figure 8.13
Install a jumper from the second switch to PortB.3 (pin 4).
Figure 8.14
Install a jumper from the third switch to PortB.4 (pin 5).
Figure 8.15
Install the final jumper from the fourth switch to PortB.5.
Figure 8.16
Finally, install a 1.5Kohm resistor between each of the jumpers and the second terminal of each of the switches as shown in figure 8.17.
Figure 8.17
Adding the Switches