6.6.2 Switches

The switches are labeled SW0 to SW7 and are available on the SWITCHES header. The switch hardware is shown below:

When pressing one of the switches, the corresponding SW pin on the SWITCHES header will be pulled low. When the switch is released, the switchʼs 10 kΩ pull-up will pull the line to VTG. The 150Ω resistor prevents a large current flowing to ground in case of wrong wiring.

Connect a cable between the SWITCHES header and one of the PORT headers. Use a 10-wire cable to connect to all eight switches or a two-wire cable to connect to one or two switches.

Note: On most AVR device pins configured as input, you can enable an internal pull-up, removing the need for an external pull-up on the push button. In the STK600 design, an external 10 kΩ pull-up is present to give all users a logical ̔1ʼ on SWn when the push button is not pressed, even if the internal pull-up is not enabled.