MUX74HC4067.h and en pin

Hello Everyone - I was planning on using this library to run 3 multiplexers in parallel. When I look at the library examples, it defines or create an instance for MUX74HC4067. In the example it is created as mux. It then runs through a loop using only an integer to read the respective pin input from mux. I don't see how I can tell it to turn off that mux and turn the next one on say mux1, unless this happens after every time the library is called. If I don't use the library I understand how to do this since the en pin will just be sent high to disable one chip and low to enable the next.

Are the chips being turned off by the library?

Perhaps provide a GitHub link to the actual library you're using.

Thank you - I should have done that on the original post. The following is the link.

Check out the source code in MUX74HC4067.cpp. You'll see that the read() method first calls the setChannel() method to select drive the device's select inputs for the requested pin.

Is it as simple as

if "mux1" has been defined as one of the multiplexers

mux1.enable();

or

mux1.disable();

I did not see this in the examples given but found soe reference to it in the documentation. Please see below:

void enable();
It enables the connection of the SIG pin with a channel that was set earlier by calling either setChannel or write.
void disable();
It disables the connection of the SIG pin with a channel that was set earlier by calling either setChannel or write.

Anthony

I just gave the source code a quick look (suggest you read it thoroughly), but it looks like enable() and disable() set the Steady State status of the SIG pin. But, even if it is disabled, the read() method temporally enables it, then reads the pin, then disables it. Said another way, even if the pin is disabled (Steady State), the read() method will work as expected.

If that doesn't answer your question or you actually had a different question, then please try rewording and stating it more clearly.

Thank you gfvalvo- since there will be three multiplexers hooked up to the Sam sig pin and the same s0-s3 pins, I just want to make sure that 2 of the 3 multiplexers are turned off at a given time to make sure I do not get a signal from a chip/pin that was not expected. I think that is what the en connection on the chip does but I think en is called in the defined mux1 or mux2, etc

Anthony