Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to control a demultiplexer

Status
Not open for further replies.

overgift

New Member
Hi all,

I'm controlling a demultiplexer by using uC AT89C5131. The problem is when I was switching one channel as output, the channel is always output, I cant change it anymore during the whole process. Even I switched of the INHBIT or powered off and powered on again, this channel was like the output forever. I use MATLAB to control the uC, in another way, I type in MATLAB myself to choose which channel as output channel....

Can anyone with experience give me some suggestions? Thanks in advance.
 
Hi all,

I'm controlling a demultiplexer by using uC AT89C5131. The problem is when I was switching one channel as output, the channel is always output, I cant change it anymore during the whole process. Even I switched of the INHBIT or powered off and powered on again, this channel was like the output forever. I use MATLAB to control the uC, in another way, I type in MATLAB myself to choose which channel as output channel....

Can anyone with experience give me some suggestions? Thanks in advance.

hi,
Whats the part type for the demux ic.??

Any chance of posting a sketch of the MCU to mux connections.
 
Last edited:
hi,
Whats the part type for the demux ic.??

Any chance of posting a sketch of the MCU to mux connections.

The demux is HCC 4067B.

The uC to demux is simply. A;B,C,D, INHBIT are the control bits of demux.

connection is:

p2.0-->A
p2.1-->B
p2.3-->C
p2.4-->D
p2.5-->INHBIT

the other pins of demux are output channels. Vcc is 12v.
 
Have you used a scope to verify that your addresses are changing? Are the addr stable long enough for a read. Do you have some way to differentiate each channel, ie. different levels on each analog input pin?
 
Last edited:
The demux is HCC 4067B.

The uC to demux is simply. A;B,C,D, INHBIT are the control bits of demux.

connection is:

p2.0-->A
p2.1-->B
p2.3-->C
p2.4-->D
p2.5-->INHBIT

the other pins of demux are output channels. Vcc is 12v.

hi,
Do you appreciate the 4067 is a analog mux.?

Are you using pin1 'Z' in anyway.?

pin15 of the 4067 is Low to enable.
 
What kind of test equipment do you have? Scope, meter?
 
Hi all,

I checked my circuit and I think I have some problem with the ground. The uC and demux share the same power supply so their grounds are connected together. My question is should the ground of the input signal connect to the same ground as uC and demux?
 
Mixing analog and digital grounds is not always a good idea due to noise, but I doubt it would make your circuit non functional.

Can you select one channel with your software and leave that channel active? Lets pick channel 0010, select that channel and with your scope check if you have 0010 on the pins. Thats first step.
 
Mixing analog and digital grounds is not always a good idea due to noise, but I doubt it would make your circuit non functional.

Can you select one channel with your software and leave that channel active? Lets pick channel 0010, select that channel and with your scope check if you have 0010 on the pins. Thats first step.

Thanks for the tutoring. I gave a 0010 from my code, and it appears 0010 on the uC pin, but seems the channel hasnt been chosen. I dont know how to connect the ground of the signal.
 
Hi all,

I checked my circuit and I think I have some problem with the ground. The uC and demux share the same power supply so their grounds are connected together. My question is should the ground of the input signal connect to the same ground as uC and demux?

Yes, they should be linked.

Are you switching analog signals.?
 
Last edited:
Yes, they should be linked.

Are you switching analog signals.?

yes I switch analog signal. It is a constant voltage signal.

Now I connected them together, the thing is now seems the channel 0 of demux has been locked as output, there's no chance to change to other channels. I switched to another demux with the same type, still the same. Now I'm wondering there is some problem with the i/o pins of uC.
 
Last edited:
Thanks for the tutoring. I gave a 0010 from my code, and it appears 0010 on the uC pin, but seems the channel hasnt been chosen. I dont know how to connect the ground of the signal.

Have you checked for the 0010 on the mux chip itself?
 
yes I switch analog signal. It is a constant voltage signal.

Now I connected them together, the thing is now seems the channel 0 of demux has been locked as output, there's no chance to change to other channels. I switched to another demux with the same type, still the same. Now I'm wondering there is some problem with the i/o pins of uC.

I havnt seen your program.

If you suspect the 4067, I would disconnect the 4 address wires from the MCU.

Connect the 4 address pins to 0V and +V to make different addresses, monitor the Z pin of the 4067..with a scope

Is it audio you are trying to select, if so, how is the signal connected to the 4067.?
 
Eric, what is up with pin 1? That pin confuses me, what is it for? Should it be tied low

I am thinking logic high sets the output high Z, is that it?
 
Last edited:
Eric, what is up with pin 1? That pin confuses me, what is it for? Should it be tied low

hi Mike,
As its an analog mux, pin1 'Z' is an input/output pin. [ to the 16 selected i/o pins]

The HEF4067 can control signals in either direction as its analog.
 
So are you saying pin 1 is a direction control pin? So for in to out pin 1 should be low right?
 
Status
Not open for further replies.

Latest threads

Back
Top