nlamprian / MUX74HC4067

Arduino library for interfacing with the 74HC4067 mux / demux
MIT License
28 stars 19 forks source link

EN connected to GND? #1

Open DiegoSynth opened 4 years ago

DiegoSynth commented 4 years ago

1st of all, thanks a lot for the class and examples, it saves a lot of time!!

As I've seen in the code, it's not possible to connect EN to GND, and if one doesn't want to disable the multiplexer (how often does anyone disable an I/O anyway?) then anooother arduino PIN is used for this (that would make the 6th pin, which in my opinion is total overkill).

I was wondering if you were interested in allowing a "-1" value for "en" for example, or a "GND" constant in the Constructor, taking care as well of any reference to "en" attribute later on in the code.

I write to you because you are the author, and I think it would be nice to have this for the future and for everyone :)

Thanks, Diego

nlamprian commented 4 years ago

Hi Diego,

To get extent that I can remember the details of the module and my library, the enable pin serves two purposes.

One consideration has to do with hardware, and yes it's not necessary in every use case. By disabling a module, you allow the use of multiple multiplexers in parallel.

Another consideration has to do with software. I use the enable pin to disable the module, as I transition between channel. My assumption here is that the current value of the sig pin could accidentally pass to the other side, and trigger an unwanted event, before the desired channel is selected.

Feel free to fork the library, and experiment with it. And if you find out that you don't have any interference problems, then go ahead and eliminate the enable pin.

DiegoSynth commented 4 years ago

Aaaah, I haven't thought of that. You must be right, i've read about issues with false positives and most probably the way you do it gets rid of it. I have everything plugged and ready but haven't tried the software yet. I'll play with it, and if anything come back to you! Thanks again, Diego