Pull up or down ? I'm confused

Thread Starter

André Ferrato

Joined Apr 5, 2015
215
Hi guys, just tell me if i'm wrong. I have the following circuit, the 10k resistor are used to pull down ou pull up the encoder ? The way i see it, is that when the switch is NOT pressed, current goes through the IC from the Vcc passing into the internal resistance and them into ground. When the switch IS pressed, the current will go through the internal resistance and them the 10k resistors ? Because the way i see it, is that for this to make sense we would need a Vcc connection near the switches. Am i wrong ? I'm new to this.

 

Thread Starter

André Ferrato

Joined Apr 5, 2015
215
So i take off the 10k resistors and what is happening is that when the switch is NOT PRESSED, there is no path through that pin, so the pin is low ? When i press current goes through the pin and make it high ?
 

MikeML

Joined Oct 2, 2009
5,444
Download and read the data sheet.

Both the data inputs and address inputs are active-low with internal pull-ups. The switch should pull to ground when asserted.

With the switch open, the pin should be high. Switch closed pulls the pin to gnd.
 

ErnieM

Joined Apr 24, 2011
8,377
Look at the pin description for this device on it's data sheet. It says:
"Input pins for address/data AD8~AD11 setting
These pins can be externally set to VSS or left open"

So you either set them low or they set themselves high if left to float.

You may be just fine by leaving the 10K resistor in, check if they truly go low when you press a button. If they don't go very close to ground (say .25V max) then replace the 10K resistors with a short.

"Simon sez" the current will be just fine.

(Simon is the data sheet.)
 

#12

Joined Nov 30, 2010
18,224
Voltage is not current. The battery is always, "high" on its positive end, and it doesn't use any power to do that.
 

WBahn

Joined Mar 31, 2012
29,979
They will draw less power when the pin is floating (and pulled high internally) than when you ground it with the switch (with or without the resistor). But it is designed to operate that way.
 

Thread Starter

André Ferrato

Joined Apr 5, 2015
215
I understood now, i get really lost reading datasheets, and still dont know why they go low when the switch is pressed. Can someone show me some numbers ? Like when i'm using a 12v battery, what happens to be high, what happens to be low. It would be nice just to see. To clarify, i understood the concept.
 

MrChips

Joined Oct 2, 2009
30,712
I explained pull-up and pull-down here for digital inputs.

Morse Code Display Project

The same principle applies here.

The HT12 datasheet indicates that the inputs are pulled up internally with 150kΩ resistor (nomimal). Hence you don't need pull-down or pull-up resistors. A simple switch to GND will input a logic LOW.
 
Last edited:

WBahn

Joined Mar 31, 2012
29,979
When you press the switch, you are shorting the pin to the 0V (the "common" or the "ground") which is also the negative side of your voltage supply. Thus the voltage on the pin under those conditions is oV, which is "low". When you release the button, there is a pullup device (could be a resistor but is probably actually a MOSFET) inside the device that pulls the pin toward the Vcc supply voltage, thus taking it "high".
 

atferrari

Joined Jan 6, 2004
4,764
I am afraid the the OP is forcibly trying to label those resistors as "pull-down" (or pull-up) what they actually are not. If he moves them to the pin, then they would be genuine pull down ones.

Here, what actually pulls down the pin is the switch.

Edit: coming late, as usual. :(
 
Top