-1
\$\begingroup\$

I am using 74hc4067 IC(Multiplexer 4:16) for the extend the gpio pins can i use that gpio pins same time or not? and any one suggest about the ic how it is used?

\$\endgroup\$
  • 1
    \$\begingroup\$ Just look at the truth table on the datasheet \$\endgroup\$ – MCG Aug 24 '18 at 12:12
  • \$\begingroup\$ Truth Table Says that 0001, 0010 but Work at Same Time? This is My Question \$\endgroup\$ – Jaimin Aug 24 '18 at 12:16
  • \$\begingroup\$ Then you need to edit the question to ask what you need to know. \$\endgroup\$ – Scott Seidman Aug 24 '18 at 12:22
  • \$\begingroup\$ What do you mean it says they work at the same time? Where does it say that? They cant work at the same time \$\endgroup\$ – MCG Aug 24 '18 at 12:28
1
\$\begingroup\$

Page 2 of the DATASHEET tells us exactly how this device works. You will need 4 GPIO pins to control 16 output pins on the MUX.

So, as I mentioned before, page 2 will tell you show this device works.enter image description here

So, as you can see, you have 4 'select' pins. These need to be toggled high or low to control the outputs. The enable pin (active low) is toggled to turn the outputs on/off.

The device works in binary, so the 4 select pins are your binary input (0-0-0-0 up to 1-1-1-1) and the channel selected is the decimal representative. So, if you wanted to select channel 5 for example, you know the binary for 5 is 0-1-0-1.

Next, you look down the table to find the output channel '5', you can see that working back from S3, the binary representative is 0-1-0-1.

That is all you need to know to use this device. You give it a binary number on the select pins and the corresponding output channel is selected. Follow the truth table down and you will see it.

If you want to switch from one number to another, it is a good idea to toggle the Enable pin high to disable the outputs, then select your channel before toggling the enable low to enable them again, this ensures that the MUX has fully switched over to the new output (I have been caught out by this before).

\$\endgroup\$
  • 1
    \$\begingroup\$ or you can use gray code when iterating assuming the IC doesn't glitch when only a single bit is changed \$\endgroup\$ – ratchet freak Aug 24 '18 at 12:32
  • \$\begingroup\$ I've heard of Gray code, but have not used it, and haven't actually looked into it too much as I have never needed to. I don't have the knowledge to talk about it in my answer, but it is a valid tool to use, so I would go ahead and write a new answer suggesting to use that \$\endgroup\$ – MCG Aug 24 '18 at 12:34
  • \$\begingroup\$ If I Do to ON 0101 and 0111 at Same Time If it is Possible @MCG \$\endgroup\$ – Jaimin Aug 24 '18 at 12:44
  • \$\begingroup\$ No, how could that be possible? You can't have an input at logic 0 and 1 at the same time. That doesn't even make sense how you could think that..... \$\endgroup\$ – MCG Aug 24 '18 at 13:13
  • \$\begingroup\$ @Jaimin could you explain why you think it is possible to have a pin in 2 different states at the same time? Or have I misunderstood you? \$\endgroup\$ – MCG Aug 24 '18 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.