A DIP switch is a manual electric switch that is packaged with others in a group in a standard dual in-line package (DIP). The term may refer to each individual switch, or to the unit as a whole. This type of switch is designed to be used on a printed circuit board along with other electronic components and is commonly used to customize the behavior of an electronic device for specific situations.
DIP switches are an alternative to jumper blocks. Their main advantages are that they are quicker to change and there are no parts to lose.
The DIP switch with sliding levers was granted US Patent 4012608 in 1976. It was applied for 1974 and was used in 1977 in an ATARI Flipper game.
There are many different kinds of DIP switches. Some of the most common are the rotary, slide, and rocker types.
Rotary DIP switches contain multiple electrical contacts, one of which is selected by rotating the switch to align it with a number printed on the package. These may be large like thumbwheels, or so small that a screwdriver must be used to change them (although there are also small potentiometers of this type).
The slide and rocker types, which are very common, are arrays of simple single pole, single throw (SPST) contacts, which can be either on or off. This allows each switch to select a one-bit binary value. The values of all switches in the package can also be interpreted as one number. For example, seven switches offer 128 combinations, allowing them to select a standard ASCII character. Eight switches offer 256 combinations, which is equivalent to one byte.
The DIP switch package also has socket pins or mounting leads to provide an electrical path from the switch contacts to the circuit board. Although circuits can use the electrical contacts directly, it is more common to convert them into high and low signals. In this case, the circuit board also needs interface circuitry for the DIP switch, consisting of a series of pull-up or pull-down resistors, a buffer, decode logic, and other components. Typically, the device's firmware reads the DIP switches when the device is powered on.