This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CD74HC4067: Can I use the CD74HC4067 for input and output (separate pin) at one time?

Part Number: CD74HC4067
Other Parts Discussed in Thread: TMUX1208

Hi,

In my Arduino project I would like to have 8 channel for inputs (example for button) and 8 for output (example for led). I like to read and write only digital data.

Does it work if I select the CD74HC4067 S0-S4 address for the input pin and I read the data from the SIGN pin, After that I set the address for the output pin and write out the data to SIGN pin?

Thank you in advance for your answer.

Laszlo

  • Laszlo,

    How did you find the CDHC4067 which has 16:1 when you were looking for an 8:1?

    The Ti.com switch search tool where you can filter for devices that are 8:1.  What do you think about using the TMUX1208? 

    All of these devices are bi-directional passive FET switches which means you data or signals can flow in either direction.  You can read or write to any device in your system through the signal switch as long as your voltages are within the recommended operating conditions.

    Thank you,

    Adam

  • Adam,
    Thank you very much for this good and smart comment.

    There are two more important clarifications:
    1. I have only 5 free ports on my board (eg arduino uno)
    2. I would like to use altogether 16 ports, but the ratios may differ (eg 5 INPUT port and 11 OUTPUT port).

    Out of scope: I do not really want to use i2c/i2s protocol.

    Best regards,
    Laszlo
  • Laszlo,

    The passive FET switches do not have any drive capability.  They are not like GPIOs that can source or sink current.  The switches will simply act as a wire and pass the voltage/current seen on the pin to the other side or not.  You may configure GPIO0 from the Arduino as an output and set the select pins of the mux with GPIOs 1-4 to make any port an output.  You may then change the GPIO0 as an input and make any I pin of the switch an input.  The only limitation with this method is you can only select one I pin at a time to connect to the COM pin.  

    Thank you,

    Adam

  • Adam, 

    thanks for the reply, helped me a lot.
    I'm going to try it because it looks good.

    Best regards,

    Laszlo