How do these M74HC4051 mux/demux work anyway?

There’s a question about these things (here) but what I’m wondering is how the chip knows to mux or demux?

Datasheet: http://www.st.com/web/en/resource/technical/document/datasheet/CD00000317.pdf

Now I get the bit about using the A/B/C inputs to choose a channel (1 of 8). And the in/out ends up on pin 3 (COM IN/OUT).

But what sets the direction? Is it reading on the 8 ports and sending it to pin 3, or is it reading pin 3 and sending it out the ports? Or both at once? If so, how?

They are (theoretically) completely transparent. You apply a voltage (within bounds) and that voltage appears at the other side if that channel is selected with A/B/C. Inhibit switches "off" the device by selecting no channel at all.

You don't have to do anything at all to tell it which way it's working, it just does it. Not quite sure how, but it does :wink:

I think basically it's just a pair of MOSFETs back to back which, when off, present a high resistance, and when on present a low resistance with no specific polarity.

I think it is as simple as majenko wrote.
They are like switchable on/off resistors, so the digital or analog signal can be in both directions.
It is just like the switches of the CD4016 and the CD4066.

Falstad has a good simulation of one. I have tried swapping the in/out of one of those gate pairs, and yes it works both ways.

They all CD4016,66,4566,4051... use what RCA called a transmission gate 2 fets... it is a bilateral switch with effective bi lateral ohmic contact (400 to 1K and limited to ~5 mA) and a frequency response to 4 to 10 MHz. The CD4000 (16 -66...) can deal with 0 to 15 or +/- 7.5V bipolar signals and with 0 to 15 V CMOS logic type control signals... all from a 0 to Vcc control signal. The only real obvious restriction is the gate or 'channel' resistance, it has a slight tempco to it. There are versions that can select 16 inputs (CD4097).

Bob

Yes to everything the other guys said. The 4051 d/s isn’t very descriptive, but the following
4066 d/s shows how those gates are designed. Will pass analog signals in both directions.
http://doc.chipfind.ru/fairchild/4066.htm

4066.jpg

Thanks for all the info.

I happened to have one lying around, so I hooked it up to test. It does indeed do what you said. If I supply an analog signal (eg. a sine wave) on either the input or the output, it is replicated at the other side, pretty-much exactly. Careful measuring seems to suggest around a 5 nS lag from input to output, which is consistent with the datasheet.

Pretty useful thing to have around, if you need to take a lot of analog readings in quick succession.

I think I have the hang of it now.

I've done a tutorial on using them, as I couldn't find many hits when I tried to search for them before.

Nick, could you write in the tutorial something about the switchable resistor. That would make clear how it works. Perhaps something like this:

If a line is selected, the selected line has a small resistance to the common output/input pin (about 80 ohms). If a line is not selected it has a large resistance (too large to measure) to the common output/input pin. The resistance is created with fets.

I have a similar question about a thermos flask. It keeps hot things hot and cold things cold. How does it know what to do? :wink:

I think what Erdin is addressing is called the On Channel Resistance, Equivalent “Almost” to RDSon in a mosfet… The transmission gate isn’t a power switch, quite the contrary the data sheet states a limit of (from memory) of 2 - 5 mA MAX @ 5V and 5 - 7.5 mA @ 15V. they will work quite well and the small variations in the on channel 100 - 300 ohms over voltage and temp fall out compared to the input impedance of the analog input. Keeping that minor limitation (they weren’’'t designed for power use at all) in mind will allow a switch that will work from DC to 10 + MHz …

Bob

@ Mike, That’s IT, IT DOES NOTHING…

Bob

10 MHz ???
I find that they leak like a sive at 125KHz.

See the smiley wink.

Grumpy_Mike:
I have a similar question about a thermos flask. It keeps hot things hot and cold things cold. How does it know what to do? :wink:

It resists change, Mike. What I want to know is, how come there isn’t a positive feedback loop, when some voltage on one side appears on the other side, and then is re-amplified back to the first side? The only answer I can think of is that it would have unity gain, and thus no feedback.

Grumpy_Mike:
10 MHz ???
I find that they leak like a sive at 125KHz.

Ach, now I'm going to have to set up my test again. I was getting reasonable results at 10 MHz, that is, I was starting to doubt my measuring equipment more than the chip.

There is an important difference between "4051"s however There is a CD4051 AE, a BE and some 'variants'. The CD parts are good to `15V (18Vmax) the AE parts are 'unbuffered' and the BE parts are buffered.
The 74XXX405X is a different critter the HC part has a 9V limit (the only one I looked at) and I know that there is a 5V only part in the 74XXX family of parts.
The devices aren't amplifiers but gated mosfets, small signal mosfets used as switches.

Bob

This is what I am getting at 10 MHz. Ch1 (yellow) is the input and Ch2 (blue) is the output.

The part number is M74HC4051B1R.

Erdin:
Nick, could you write in the tutorial something about the switchable resistor. That would make clear how it works. Perhaps something like this:

If a line is selected, the selected line has a small resistance to the common output/input pin (about 80 ohms). If a line is not selected it has a large resistance (too large to measure) to the common output/input pin. The resistance is created with fets.

I’ve added a paragraph about switched resistances.

The picture below is running at 20 MHz. The lag of around 5 nS is pretty clearly visible.