Pages: [1]   Go Down
Author Topic: How to multiplex digital inputs?  (Read 1395 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
http://www.arduino.cc/playground/Code/MUX151
but i didnt really understand much. It's a bit confused and not easy for a noob like me...
anyone help?
Logged

malmö / berlin
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
fhp>--vs--<k3
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


hej

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
tomek
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

hi

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.


D
Logged

Pages: [1]   Go Up
Jump to: