Multiple DIP switches are often used to set a code that a microprocessor must read.
Described here is a simple circuit that generates a unique output voltages for any combination of the switch settings that the A/D input of the micro can read to minimize the number of I/O ports required.
Below...