Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switch Multiplexing

Status
Not open for further replies.
williB said:
Yeah ,but say you wanted to add 9 switches to your project and you only had one input and one optput left..
a single 4017 seems like a viable solution
* ducks and covers *
:lol:

Yes, it's a viable solution, as I mentioned before, it's commonly used.

EDIT : Nigel can your matrix detect two switches being pressed at the same time ??

Yes, it only depends on the scanning software you write - the keyboard you're typing on now almost certainly uses software scanning of a keypad matrix (just bigger!), as do your remote controls, mobile phone, microwave oven - almost anything with any number of keys.
 
Configure this pin as an a to d and bias it to ground with 10k. Let each switch pull the pin high through a different resistence. Now read the atd in
and use software to figure out what switch is pushed.

ex sw 1 = 1k voltage = 4.5 volts
sw 2 = 10k voltage = 2.5 volts
sw3 = 20k voltage = 1.5 volts
no switch voltage = 0 volts
 
why not simply stick in one more pic or bigger pic?
using additional pic with only 1 or 2 io pins for communication
and all other pins for multiplexing you can add
significant number of switches.

there is one problem with the open loop counting method
like in 4017 example: it works as long as you don't loose count.
i would feel better if i could reset it when ever i want to but this means
one more pin.

maybe you don't need any other chips at all... how are you using existing ones (other than two you already mentioned)?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top