Go Down

Topic: How to multiplex digital inputs? (Read 4060 times) previous topic - next topic


Does anybody know if there is  anything like the 4051 but fot digital inputs?
I need to read more than 15 pushbuttons so i think there must be something like that...
I found this
but i didnt really understand much. It's a bit confused and not easy for a noob like me...
anyone help?



if you just want to turn on one or two buttons at the same time you could use two 4051 as a matrix like on the right sketch at http://www.arduino.cc/playground/Learning/4051, so you can conntect up to 64 buttons,

otherwise you could use as well two 4051 connect them to the same 3 digitalOut Pins(so they will get the same adresse all the time)  and each of the Outputs comming from the 4051s to one digitalIn Pin, so you just using 5 pin to read 16 puschbuttons,...

ortherwise you could as well do it like the left example at  http://www.arduino.cc/playground/Learning/4051, but just connectionthe ouput of the 4051 to a digital Pin not to an analog pin, and so again 64 pushbuttons to read with just 7 digital Pins

so at all the 4051 don't care about if you want to read digital Singals or Analog singals. So never mind and just use the 4051.

ha det bra


Hi Tomek,
Thanks for that info. Will that approach work if I want to check whether 5 keys or more are pressed at the same time?



If you can get a hold of Forest M Mims' Getting started in Electronics ( highly reccomended for everyone!) you can find at least a half dozen encoder  diagrams. Also good is the TTL cookbook or the CMOS cookbook.


Go Up