Logic Levels of DIP Switches and Push Button

Thread Starter

wind_blast942

Joined Sep 7, 2010
22
Hi all

I am currently running a simulation for my project. However i am curious about the actual logic levels for a DIP switch and push buttons that i will be using in the actual circuit.

According to the simulation software i am using (Circuitmaker) an unpushed push button will give a high impedance value; and since there is no DIP switch model in the program, i assume it to be similar to a logic switch (Logic 0 when open, 1 when close)

My question is: Is the assumption that a unpushed push button have high impedance and that a DIP switch automatically outputs a logic 0 or 1? If not is there any method to make my assumption true in an actual circuit?

Thanks.
 

Markd77

Joined Sep 7, 2009
2,806
Try adding a resistor to the logic 1 voltage level and the pushbutton to ground. It's called a pullup resistor and is fairly common. Real switches also bounce which can need more consideration.
 

Georacer

Joined Nov 25, 2009
5,182
A DIP switch will conduct either Vcc or Ground, as clear as your wiring gives it to the switch.

A push button will conduct either the logic level it is connected to, or it will be an open circuit. This is quite definite in the low-voltage level that IC's work.

However, as Markd77 posted, bouncing is a serious drawback of this type of switches. My suggestion is that in order to secure a pure and bounce-free logic level for your input, you should use a NAND latch debouncer. Google it for more info or try the second page of this blog: http://www.ganssle.com/debouncing.htm
 
Top