Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

74hc4051 model

>ADEC [INHd A2d A1d A2d] etc ...
Yes, I fixed this too - should read
ADEC [INHd A2d A1d A0d] etc.

Still not working 😞
0 Kudos
Message 11 of 16
(9,655 Views)
Grrr.... The number of times this has happened to me you think I'd learn Smiley Mad.

The pin mapping table/template somehow got messed up while working on the component.   So so the wrong pin to node mapping was taking place ...

I've got it working now:Smiley Happy

Here's the (simple) 74HC4051 model with all corrections (I've not reactivated the clamping diodes yet):

.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
*******************************************************************************
**** 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 A0d] [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
**** 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
*** 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 74HC4051


0 Kudos
Message 12 of 16
(9,634 Views)
If you wouldn't mind could you post a schematic with your component on it. What I would like to do is add this to our repository site. This would be a great addition to that.  If you would like to add this yourself then goto http://www.ni.kittmaster.com sign up if haven't already (totally free) and place it in the download area. This way others can share your component if you are willing to do this. If I post it for you then you will get 100% credit as the component's author/creator.
 
I am glad you got it working. I have one quetion (for curiousity sake). Did you create this from scratch or did you have another component model as a guide? I am just curious because I have limited experience in creating models. Either way you diid a great job.
 
 
Kittmaster's Component Database
http://ni.kittmaster.com

Have a Nice Day
0 Kudos
Message 13 of 16
(9,627 Views)

I'll try to find the time to create a simple schematic either tonight or this w/e.   I uploaded the component to your website last night.

I created the model based on studying the models for a number of other analog switches supplied with Multisim, plus quite a bit of reading of the OrCad PSpice manual.

Why the Orcad manual?  Because, for some reason I don't understand, NI don't appear to publish reference manuals and usage guides for their derivatives of Spice and XSPICE.   So, for example, I couldn't find ANY documentation on (e.g.) aswitch, I just had to infer its usage from looking at other models in the library (e.g. 74hc4066).   Similarly, I only found any detail of the adc_bridge and dac_bridge in one of the Co-Simulation tutorials on the web-site.

 I guess I could have used a VSWITCH instead of an aswitch, but most of  the models for analogue switches in the library that I could understand seemed to be using an aswitch.   I didn't even contemplate basing my model on any of the analogue switches that were proper (or close to proper) models of the internal componentry of the ICs in question!

NI please publish a *complete* reference for people who need to create models.   Don't assume that we all have years of experience of SPICE - I've only been creating models for components since about a month ago, and before then I had no SPICE knowledge at all, and I'm not working in a team where I can pick other folk's brains.

I also couldn't work out how to put a copyright (c) statement in the component I created.

Note that the model I created does what I need it for, but is by no means accurate, as it doesn't contain input caps, caps across each switch, clamping diodes, doesn't have any delay in either the digital section, or in the analogue switches (I don't even know if you can put that into an a_switch).  I'm sure it wouldn't exhibit the same frequency response model, phase behaviour, jitter etc. as a real '4051 would.

If I had been feeling very masochistic, I could have taken the model of ONE of the internal switches used in the '4051 on the NXP website spice models for 74HC components, and used that to model the FETs in the switch section properly, but decided that for my purposes a naive model would suffice.

FWIW I've also created a bunch of 74AC components, a 74HC4017 Johnson Decade Counter, and have used the MAX999 model from the Maxim website to create a component for that.   

As those are mostly based on the 74HC or 4000 series components shipped with Multisim, I think it very likely that NI will have a view on the copyright ownership of the derivate works ... so I'm loath to place them on your website without at least some form of "go ahead" nod from NI.

PS How do I mark this thread as having an answer???

Cheers

Dave

Message 14 of 16
(9,622 Views)
As long as the model file contains a copyright notice even if it is within a complete component, I do not believe it would be a problem uploading it anywhwere, but I will check with Chris (he is the owner, I am just an administrator) to make sure about this.
 
On that note, you could have put your own copyright notice in the model file and that way it would be known. If you need to put that on the part you uploaded that could have been down in the description area also.
 
I don't think this forum has the ability to mark threads as having an answer. NI would have to answer that one if there is because I  have never seen anything like that.
 
 
Kittmaster's Component Database
http://ni.kittmaster.com

Have a Nice Day
0 Kudos
Message 15 of 16
(9,606 Views)
I believe there is a field for copyright data that would be inclusive to the part. I would guess that you could put in disclaimers and such. Since we are not all expert modelers, just put that in the comment section.

Personally, people that are uploading and downloading are already warned that the models may not be perfect. IMO, most will be greatful just to get something that is usable for operational sake.

I saw the upload, thank you, please feel free to contribute and take whatever you may need. The more folks the merrier.

Best,
Chris


Signature: Looking for a footprint, component, model? Might be here > http://ni.kittmaster.com
0 Kudos
Message 16 of 16
(9,602 Views)