Electronics > Projects, Designs, and Technical Stuff
Tied outputs on 74HC4067's
TimB100:
Hello people,
Thanks in advance for any help you can give.
I have a design where I have 6 x 74HC4067 devices (16-channel analog multiplexer/demultiplexer).
https://assets.nexperia.com/documents/data-sheet/74HC_HCT4067.pdf
They will feed 96 sensors to a Pic micro.
My question is:- Can the outputs all be tied together, or should I feed each to an AN input on the pic?
The reason I ask is that I'm using a 28 pin pic and by the time I assign the 6 AN lines the 74HC4067 channel select lines and the individual chip select lines, my own SPI com lines and the RX +TX and programming lines I have run out of pins. If I can tie the outputs of the 74HC4067 together it would all fit.
Thanks
Tim
Ian.M:
They are analog switches, so in principle you can tie their switch commons together (they don't have 'outputs' as such). However, if you tie them you'll need individual /E lines for each '4067 so only one is active at a time , though you can save threeMCU pins by using a 74HC138 3 to 8 line decoder to generate the six /E lines from three select lines. S0 to S3 on all the '4067s can be paralleled like for like, so a total of eight MCU I/Os will be required, seven outputs to address a specific input channel and one ADC pin.
That's only a saving of two MCU pins compared to the four outputs required to drive the Sn lines in parallel and six ADC inputs , keeping the '4067 switch commons separate and assuming its acceptable to keep the /E lines grounded .
Both solutions assume its acceptable for switching glitches to briefly short two sensors for as long as it takes the new input selection to propagate through the '4067 internal logic. If you must guarentee break before make, you'll need a master /E signal so you can disable all the '4067s before changing the input selection control lines. Wire it to the '138 if you tie the commons together to one ADC pin or to all the '4067 /E pins if using separate AC pins.
N.B. the single ADC pin arrangement will have slightly worse crosstalk and noise than separate ADC pins. It shouldn't matter if all the sensors are similar, low impedance and don't have HF noise on their outputs.
TimB100:
Hello Ian
Many thanks. :-+
I have enough outputs on the pic to have the 4 channel select lines and 6 outputs for the enable lines so if I can tie the outputs together with out "OFF" devices dragging the signal down I'm happy.
The sensors are ir phototransistors and will all be calibrated for a threshold change as part of the overall calibration of the system.
I can happily code in a delay between switching devices to let things settle before scanning the next devices channels.
Tim
Zero999:
Are the phototransistors illuminated by LEDs which your MCU has control of? If so, there could be a way to multiplex them by wiring them in parallel and switching the LEDs on and off.
TimB100:
Hi,
Yes I have control over the Leds. Or I will do when the design is finished.
The issue on that side is there will be 25 odd of them. I was thinking of running them in series from 12v in blocks. But flooding could be an issue.
I will not multiplex them or PWM as its pointless. I have plenty of power and I would need to time it with the scan so they might as well stay on full time. I will thought need to turn the output down somehow.
So there is no guessing I'm measuring the height of water in a tube. I need sub 1.5mm height accuracy. The ir sensors will be 1.3mm apart. The leds will illuminate the back of the tube and the sensors pressed up against the tube.
The water will attenuate the signal so will be able to work out the level by scanning all the sensors and looking for the change.
The 25 leds at the back are so you illuminate the tube evenly.
Thanks
Tim
Navigation
[0] Message Index
[#] Next page
Go to full version