How to implement bilateral switch in LTSpice? e.g. cd4066b?

Good morning,
I also want to simulate a CD4066, I used the file linked above, but when I launch the simulation the following error message appears: unknown subcircuit in xu1 n005 n002 n003 n001 0 CD4066. Could you tell me what to do?
Thanks in advance.
Christian
 

Papabravo

Joined Feb 24, 2006
21,094
Good morning,
I also want to simulate a CD4066, I used the file linked above, but when I launch the simulation the following error message appears: unknown subcircuit in xu1 n005 n002 n003 n001 0 CD4066. Could you tell me what to do?
Thanks in advance.
Christian
It is probable that you do not have the files in the correct location. When you extract the .zip file your folder should look like this with all of the files you need in the same folder (directory). Then when you open either of the .asc files LTspice will have everything it needs to run. You may not like or understand the results, but the files run without error.

1642364805216.png

When your run the simulation the result looks like this:

1642364968202.png
 
The files do indeed work, but the problem was on one of my own schematic.
I didn't know how to add the .include CD4066.sub
But I did, I found it.
Thanks
 

Papabravo

Joined Feb 24, 2006
21,094
Right. The button on the right hand side of the menu bar labeled .op is used to insert a SPICE command onto the schematic. The button to the left labeled Aa is for placing comment text on the schematic.


1642373865726.png
 
Hello, thanks for your answers.
In fact i would like to simulate the internal structure of MAX232 to generate double voltage and negative voltage.
I try with CD4066 and ADG1412, but it is necessary to use external voltage generators (other than the traditional single 5V supply), so it is not interesting.
Do you no if the MAX232 LTSpice model is avalable ?
Thanks in advance.
Christian

MAX232_Internal_structure.pngSchematic_CD4066.pngSchematic_with_ADG1412.png
 
Top