Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

74hc4051 model

Has anyone created a model for this analogue mux?

Thanks
Dave


0 Kudos
Message 1 of 16
(7,826 Views)

I don't think that anyone has created this component in the past. You can get the datasheet from their website and then use the 'New Component Wizard' to create it.

KostasB

NIUK Applications Engineering

0 Kudos
Message 2 of 16
(7,810 Views)

Yes, but what should go into that model, the model maker doesn't help a lot 😞 

I'm positively astounded (to be blunt) that such a commonly used component isn't already defined.   I tried to work out how to modify an exisiting model (ADG508F), but failed miserably, as I'm not able to infer the language syntax from the model content (unlike the digital models which I could work out, albeit slowly).

AFAICT it should be possible to hack the ADG508F model given enough knowledge.   The main differences are

a) signal names differ:

   'HC4051 uses VCC, VEE, A0-A7 (individual in/out), A (common in/out), S0-S2 (Address Select)

b) Polarity of Enable is reversed: EN on ADG508F, ~EN on 74HC4051

c) Ron of 74HC4051 is typically much lower

d) differing voltage limits - 74HC4051 only specified up to VCC-VEE 10.5V, VCCmax=+7V, VEEmax=-7V, signal range between VCC/VEE

An alternative approch might be to hack the model for the 74HC4066, but again, I wouldn't know quite where to start!

0 Kudos
Message 3 of 16
(7,807 Views)

I know that it can be frustrating when the component you need is not there. Can you identify these parameters that are different in the Multisim model? Another idea would be to use the default model

and put logical components around it emulate the bahavior of the component you are after (not the most professional solution)

KostasB

NIUK Applications Engineering

0 Kudos
Message 4 of 16
(7,799 Views)

Here's an alternative idea that might help. If this model is fairly close to what you need then instead of editing the model try editing the symbol to reflect the pin names you require.

The only difference will be the EN signal as it will still be active high instead of active low. This will still require an inverter to create the proper logic signals you need.

As far as the voltage pins. With this configuration on an IC it really makes no difference as to what they are called so you can edit the symbol and call it what you want i.e. VCC/VEE and then just hook your power source to it and it should work fine. The only time you have to worry about the proper  voltage terminology applied to IC's is when there is no power pins present on the symbol then it does require the proper termed voltage source in order for them to function. This is mainly with the Digital IC's under the TTL and CMOS category.

I hope this may help some.

Kittmaster's Component Database
http://ni.kittmaster.com

Have a Nice Day
0 Kudos
Message 5 of 16
(7,772 Views)
I created a very simple (no attempt to model delays or capacitive loading) model which I think ought to work, but it behaves slightly oddly

.SUBCKT 74HC4015  VCC VEE GND INH A2 A1 A0 Y0 Y1 Y2 Y3 Y4 Y5 Y7 Y7 Z
********************************************************************************
*Node VCC         +Vsupply
*Node VEE         -Vsupply
*Node GND         Ground
*Node INH         Inhibit
*Node A2-A0        A2-A0 Control Inputs
*Node Y0-Y7        Mux Input/Output 1 - Mux Input/Output 8
*Node Z        Common Input/Output
*******************************************************************************
**** Mux Input Select Switches ****
aSW1  Control1 ( Y0 Z )  MC74HC4051
aSW2  Control1 ( Y1 Z )  MC74HC4051
aSW3  Control1 ( Y2 Z )  MC74HC4051
aSW4  Control1 ( Y3 Z )  MC74HC4051
aSW5  Control1 ( Y4 Z )  MC74HC4051
aSW6  Control1 ( Y5 Z )  MC74HC4051
aSW7  Control1 ( Y6 Z )  MC74HC4051
aSW8  Control1 ( Y7 Z )  MC74HC4051
**** Convert Analog Control Input to Digital ***
aADCInh [INH] [INHd]  AtoD
aADC2  [A2] [A2d]  AtoD
aADC1  [A1] [A1d]  AtoD
aADC0  [A0] [A0d]  AtoD
****Decode Digital Input*********
aDEC [INHd A2d A1d A2d] [Control1D Control2D Control3D Control4D Control5D Control6D Control7D Control8D] MUXDIGDEC
***Convert Digital Control Signals to Analog control voltages ***
aDAC1 [Control1d] [Control1] DtoA
aDAC2 [Control2d] [Control2] DtoA
aDAC3 [Control3d] [Control3] DtoA
aDAC4 [Control4d] [Control4] DtoA
aDAC5 [Control5d] [Control5] DtoA
aDAC6 [Control6d] [Control6] DtoA
aDAC7 [Control7d] [Control7] DtoA
aDAC8 [Control8d] [Control8] DtoA
*** Diode Protection ***
*D1  VCC Y0 D_Protect
*D2  Y0 VEE D_Protect
*D3  VCC Y1 D_Protect
*D4  Y1 VEE D_Protect
*D5  VCC Y2 D_Protect
*D6  Y2 VEE D_Protect
*D7  VCC Y3 D_Protect
*D8  Y3 VEE D_Protect
*D9  VCC Y4 D_Protect
*D10 Y4 VEE D_Protect
*D11 VCC Y5 D_Protect
*D12 Y5 VEE D_Protect
*D13 VCC Y6 D_Protect
*D14 Y6 VEE D_Protect
*D15 VCC Y7 D_Protect
*D16 Y7 VEE D_Protect
*D17 VCC Z  D_Protect
*D18 Z  VEE D_Protect
.MODEL MUXDIGDEC d_chip ( behaviour= "
+/inputs INH A2 A1 A0
+/outputs D1 D2 D3 D4 D5 D6 D7 D8
+/table 9
+; CONTROL IN     DATA OUT
+;INH A2 A1 A0 1 2 3 4 5 6 7 8
+  L  L  L  L  H L L L L L L L
+  L  L  L  H  L H L L L L L L
+  L  L  H  L  L L H L L L L L
+  L  L  H  H  L L L H L L L L
+  L  H  L  L  L L L L H L L L
+  L  H  L  H  L L L L L H L L
+  L  H  H  L  L L L L L L H L
+  L  H  H  H  L L L L L L L H
+  H  X  X  X  L L L L L L L L
+")
.MODEL D_Protect D()
.MODEL AtoD adc_bridge (in_low= 0.8  in_high = 3.8)
.MODEL DtoA dac_bridge (out_low= 0.0 out_high= 5.0)
.MODEL MC74HC4051  aswitch  (cntl_off= 0.5  cntl_on= 3.5
+                       r_off= 1e7  r_on= 80 log=TRUE )
.ENDS 74HC4015

The input is being fed from a digital 74HC4017_6V but with the component in circuit this scopes at only 4.5V p-p with a 5V VCC.

What is far more bothering is scoping the output at Z shows only 1.1V p-p

If I enable the input/output protection diodes, the input level drops to 3.5Vp-p????

All the Yn and Z are defined as "Passive" in the  "Pin Parameters" tab.

What have I done wrong please?
0 Kudos
Message 6 of 16
(7,739 Views)
I think I see why the output may be very low (perhaps) - I put a 10K resistor between the output and ground and the output vanished. So my guess is that the switch isn't switching.

How can I debug this please?  Can I take the model and write it to a .cir file and debug that (how)?

Thanks again
Dave
0 Kudos
Message 7 of 16
(7,731 Views)

You can just cut a paste it into Notepad or some other text editor and edit it that way. If I have misunderstood please forgive me.

Also, in your original post you said the IC was 74hc4051, but the model file you posted says 74hc4015. Could you please clarify which one it actually is?

Kittmaster's Component Database
http://ni.kittmaster.com

Have a Nice Day
0 Kudos
Message 8 of 16
(7,721 Views)
Hi,  It is an HC4051, I transposed the numbers in the model name.

Here it is with the model name corrected and also with a correction to the Mux Input selection switches bit, which I initially hoped was what my problem was, but it is still not working.

.SUBCKT 74HC4051   VCC VEE GND INH A2 A1 A0 Y0 Y1 Y2 Y3 Y4 Y5 Y7 Y7 Z
********************************************************************************
*Node VCC         +Vsupply
*Node VEE         -Vsupply
*Node GND         Ground
*Node INH         Inhibit
*Node A2-A0        A2-A0 Control Inputs
*Node Y0-Y7        Mux Input/Output 1 - Mux Input/Output 8
*Node Z        Common Input/Output
*******************************************************************************
**** Mux Input Select Switches ****
aSW1  Control1 ( Y0 Z )  MC74HC4051
aSW2  Control2 ( Y1 Z )  MC74HC4051
aSW3  Control3 ( Y2 Z )  MC74HC4051
aSW4  Control4 ( Y3 Z )  MC74HC4051
aSW5  Control5 ( Y4 Z )  MC74HC4051
aSW6  Control6 ( Y5 Z )  MC74HC4051
aSW7  Control7 ( Y6 Z )  MC74HC4051
aSW8  Control8 ( Y7 Z )  MC74HC4051
**** Convert Analog Control Input to Digital ***
aADCInh [INH] [INHd]  AtoD
aADC2  [A2] [A2d]  AtoD
aADC1  [A1] [A1d]  AtoD
aADC0  [A0] [A0d]  AtoD
****Decode Digital Input*********
aDEC [INHd A2d A1d A2d] [Control1d Control2d Control3d Control4d Control5d Control6d Control7d Control8D] MUXDIGDEC

***Convert Digital Control Signals to Analog control voltages ***
aDAC1 [Control1d] [Control1] DtoA
aDAC2 [Control2d] [Control2] DtoA
aDAC3 [Control3d] [Control3] DtoA
aDAC4 [Control4d] [Control4] DtoA
aDAC5 [Control5d] [Control5] DtoA
aDAC6 [Control6d] [Control6] DtoA
aDAC7 [Control7d] [Control7] DtoA
aDAC8 [Control8d] [Control8] DtoA
*** Diode Protection ***
*D1  VCC Y0 D_Protect
*D2  Y0 VEE D_Protect
*D3  VCC Y1 D_Protect
*D4  Y1 VEE D_Protect
*D5  VCC Y2 D_Protect
*D6  Y2 VEE D_Protect
*D7  VCC Y3 D_Protect
*D8  Y3 VEE D_Protect
*D9  VCC Y4 D_Protect
*D10 Y4 VEE D_Protect
*D11 VCC Y5 D_Protect
*D12 Y5 VEE D_Protect
*D13 VCC Y6 D_Protect
*D14 Y6 VEE D_Protect
*D15 VCC Y7 D_Protect
*D16 Y7 VEE D_Protect
*D17 VCC Z  D_Protect
*D18 Z  VEE D_Protect
.MODEL MUXDIGDEC d_chip ( behaviour= "
+/inputs INH A2 A1 A0
+/outputs D1 D2 D3 D4 D5 D6 D7 D8
+/table 9
+; CONTROL IN     DATA OUT
+;INH A2 A1 A0 1 2 3 4 5 6 7 8
+  L  L  L  L  H L L L L L L L
+  L  L  L  H  L H L L L L L L
+  L  L  H  L  L L H L L L L L
+  L  L  H  H  L L L H L L L L
+  L  H  L  L  L L L L H L L L
+  L  H  L  H  L L L L L H L L
+  L  H  H  L  L L L L L L H L
+  L  H  H  H  L L L L L L L H
+  H  X  X  X  L L L L L L L L
+")
.MODEL D_Protect D()
.MODEL AtoD adc_bridge (in_low= 0.8  in_high = 3.8)
.MODEL DtoA dac_bridge (out_low= 0.0 out_high= 5.0)
.MODEL MC74HC4051  aswitch  (cntl_off= 0.5  cntl_on= 3.5
+                       r_off= 1e9  r_on= 80 log=TRUE )
.ENDS 74HC4051

I didn't mean how to copy/paste into a text editor which is what I'm doing, I meant so I could work on it as if the component were itself a captured schematic maybe I'd stand a better chance of debugging it then.



Dave
0 Kudos
Message 9 of 16
(7,713 Views)
I did try save the model as a  .cir file and then open it, and got:

File name:  C:\Documents and Settings\amonra\My Documents\National Instruments\Circuit Design Suite 10.0\74hc4051.cir
Ignored: AADCInh [INH] [INHd]  AtoD
Ignored: AADC2  [A2] [A2d]  AtoD
Ignored: AADC1  [A1] [A1d]  AtoD
Ignored: AADC0  [A0] [A0d]  AtoD
Ignored: ADEC [INHd A2d A1d A2d] [Control1d Control2d Control3d Control4d Control5d Control6d Control7d Control8D] MUXDIGDEC
Ignored: ADAC1 [Control1d] [Control1] DtoA
Ignored: ADAC2 [Control2d] [Control2] DtoA
Ignored: ADAC3 [Control3d] [Control3] DtoA
Ignored: ADAC4 [Control4d] [Control4] DtoA
Ignored: ADAC5 [Control5d] [Control5] DtoA
Ignored: ADAC6 [Control6d] [Control6] DtoA
Ignored: ADAC7 [Control7d] [Control7] DtoA
Ignored: ADAC8 [Control8d] [Control8] DtoA
Error: Failed to create ANALOGSW(ASW8).
Error: Failed to create ANALOGSW(ASW7).
Error: Failed to create ANALOGSW(ASW6).
Error: Failed to create ANALOGSW(ASW5).
Error: Failed to create ANALOGSW(ASW4).
Error: Failed to create ANALOGSW(ASW3).
Error: Failed to create ANALOGSW(ASW2).
Error: Failed to create ANALOGSW(ASW1).

So that clearly doesn't fly as an option 😞  

0 Kudos
Message 10 of 16
(7,712 Views)