Can anyone tell me why when a pull-up resistor is enabled on a I/O pin the pin goes high? Also I am especially interested in how the pull-up function is utilized in button circuitry. Thanx!
It keeps the input from "floating". When you use a pull-up resistor you assign a state to that pin that is predictable. When you push a button tied to ground the state then goes negative. If you leave it floating there may be false readings.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Mike, I am fairly aware of an active high/low button circuit but just can't get it through my head why the BS2px I/O pin contributes anything to the circuit when we already have a 10K pull-up resistor to VDD ( Active Low Circuit)
Eagle1 said...
Mike, I am fairly aware of an active high/low button circuit but just can't get it through my head why the BS2px I/O pin contributes anything to the circuit when we already have a 10K pull-up resistor to VDD ( Active Low Circuit)
The I/O pin is where the input goes.
I'm not sure I understand what you are asking.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Mike, On the schematic you sent for a active low switch there is a resistor of 10K from after the button and prior to the 220 Ohm resistor, that is the pull-up resistor. Putting a 20k resistor after the 220 ohm resistor on the I/O pin is not doing any pulling-up. Am I making any sense at all?
Mike, Don't have a file to send you. Go to Parallax home page Type in BS2px in upper right hand corner, then click on Bs2px above picture , scroll to bottom of larger picture click on Basic Stamp 2px brief, go to bottom of page 5.
I would like to know how the 20k internal pull-up resistor can possibly do anything (in a pull up sense) in the schematic (active low) that you sent me?
It does not act as VDD it holds that pin high so it does not float. When you apply input (through a 220 ohm resistor to ground) that changes the state of that pin, registering a changed state, not a short.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Right.............you can remove the part of the schematic from VDD to after the button and only consider the 220 ohm resistor and the 20K resistor when the pull-up feature is enabled. The signal is being pulled to the five volts on the I/O pin in the upstate and changes state to low when in downstate.
Eagle1 said...
Right.............you can remove the part of the schematic from VDD to after the button and only consider the 220 ohm resistor and the 20K resistor when the pull-up feature is enabled. The signal is being pulled to the five volts on the I/O pin in the upstate and changes state to low when in downstate.
Eagle1
"you can remove the part of the schematic from VDD to after the button"
AKA the 10K resistor
"The signal is being pulled to the five volts on the I/O pin"
AKA the I/O pin is being held high or logic 1
Yes, that is correct. It will not be a dead short in the BS2px
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
It's on the page of the BS1 but it will work for the BS2px as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Post Edited (Mike2545) : 3/26/2009 12:13:23 AM GMT
The I/O pin is where the input goes.
I'm not sure I understand what you are asking.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Eagle1
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Here is the schematic for the BS2px.
I don't see the 20k resistors you are talking about.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Post Edited (Mike2545) : 3/26/2009 12:55:51 AM GMT
Eagle1
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Eagle1
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Eagle1
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Eagle1
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Eagle1
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Eagle1
Accepts noisy input, where the threshold for logic 0 is approximately 15% of VDD and for logic 1 approximately 85% of VDD
Mode 1- logic threshold
CMOS level where logic 1 is 1.4 volts and logic 0 is below 1.4 volts
Mode 2- pullup
20k ohm pull up resistors logic 1 and 0 are split 50-50 between 5 volts
Mode 3-Output direction
Hope this helps
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Thanks for the help, i get the picture now.
Eagle1
"you can remove the part of the schematic from VDD to after the button"
AKA the 10K resistor
"The signal is being pulled to the five volts on the I/O pin"
AKA the I/O pin is being held high or logic 1
Yes, that is correct. It will not be a dead short in the BS2px
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.