
Member • Sep 25, 2007
Can a microcontroller do this????
I have 5 momentary switches.. Lets say Pushbuttons. How they connect to the microcontroller isnt important to me- Shorting 2 inputs together or shorting an input to ground when the button is pressed are both acceptable.
The outputs need to short 2 connection points together (Hopefully without relays) so lets say by pressing the button on input#1, I want outputs# 1 and 2 to short together.
That would be the first question- can the controller do that???
Now IF the controller can do that we can move on. Lets simplify the idea by sayign the circuit has 1 pushbutton (input) and 4 ouput wires. lets see if I can draw it:
Okay picture didnt work- Imagine 1 or 2 wire input and 4 wire outputs (numbered 1-4)
Okay so "in1" and "in2" are connected to the momentary Push button. Pushing the button shorts them together.
When I briefly press the pushbutton, I want the micro to short outputs 1 and 2 together for 1 second
When I press the pushbutton quickly twice (press for one second, release, press again for one second) I want the micro to short outputs 3 and 4 together for 1 second
BUT if I press and hold the pushbutton for more then 3 seconds, I want the micro to short outputs 1 and 2 together for 3 second.
Does that make sense? So if all that can work, then I will have 5 pushbuttons, and 20 output lines. Is that possible?
Timing isnt super sensetive so changes can be made to that. I can use more than one Micro if needed. I really dont want to use relays if possible... cuz I would need 10 of them😔
Im not asking someone to design this for me (Although I wont stop you ;-)). What I really need to know is if its possible or am I barking up the wrong tree?
Thanks everyone!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!