??? 04/27/07 05:44 Modified: 04/27/07 06:03 Read: times |
#138076 - Overlooking the obvious? Responding to: ???'s previous message |
Bruce Grenade said:
I've got to be doing something wrong, so any help is appreciated.
I have a momentary switch (normally open). I'm trying to use a D-Type flip-flop to toggle the enable pin of a regulator. Ideally, if a user presses and releases the button the power toggles. I've added a RC filter in hopes of preventing any bounce issue and am using a CD4013 for the flip-flop. Is this the correct way to accomplish what I'm trying to do? Maybe a better method? I don't want to use a "hard" switch.
Thanks Bruce There is no one correct way to do this. That said, if you are willing to use an SPDT switch, a simple RS latch, T flip-flop, and two resistors, you can have a complete solution, including virtually instant, consistently flawless debouncing. You'll be free from all worries of RC delays and inputs that float. If you want to keep your package count down, the required latch and flip-flop functionality can be obtained from a single dual D flip-flop chip with complementatary outputs and asynchronous preset and clear inputs. If you want to make sure your "soft power switch" is always off when power is applied, an RC circuit, or even better yet, a microprocessor reset supervisor can accomplish this. --Sasha Jevtic |