How to keep a signal to high state?

Thread Starter

engkeat

Joined Aug 18, 2008
11
I am using two push on button as a limit switch, when i press the push button, it will send a signal to the controller, but the signal will cut off when unpressed.. is there any method to keep the signal to high-state when the push button is unpressed?
 

bertus

Joined Apr 5, 2008
19,939
Hello,

Do you want High state when the switch is NOT pressed and Low state when the switch is pressed ?
Use a resistor to pull the pin of the micro high, and a contact closure to ground will give the low state.
A resistor between 1K and 10K will do.

Greetings,
Bertus
 

beenthere

Joined Apr 20, 2004
15,808
That isn't much to work with, but a resistor to Vcc may be able to maintain the high state at the input. 20 -47K would work for CMOS, 4.7K for TTL.
 

RiJoRI

Joined Aug 15, 2007
536
I am using two push on button as a limit switch, when i press the push button, it will send a signal to the controller, but the signal will cut off when unpressed.. is there any method to keep the signal to high-state when the push button is unpressed?
Look into R-S latch or J-K flip-flop. The R-S will stay in one state from the time one button is pressed until the time the other button is pressed. The J-K will change state on every button press.

And don't forget buttons bounce.

--Rich
 

SgtWookie

Joined Jul 17, 2007
22,201
It would help us to help you better if you would explain more completely what it is that you are trying to do.

Can you post a schematic diagram of your circuit as it is? .PNG format images work well, as they are not "lossy" like .jpg format images are.
 
Top