jk flip flop for ltspice

Ron H

Joined Apr 14, 2005
7,063
In the Digital Component selection window, there is the behavioral xjkflop. See the Help file under Special Functions for instructions on how to use behavioral digital components. Some of this is undocumented. Come back with any questions you have.
In the CD4000 library, there is CD4027.
In the 74HC library, there is 74HC107 and 74HC109. Also see the 74HCT library.
See screen captures of these windows in the attachments below.
The behavioral digital components are installed with LTspice when you first download it. If you don't have the other libraries, get them from the Yahoo LTspice group. You will have to join first.
 

Attachments

Last edited:

Thread Starter

brandonb

Joined Nov 14, 2010
9
all i found was the icon- can you give me a link, i dropped it in the library folders like i did with wookies lm2907 file, i have an icon in the digital selection of my spice library but it doesnt work, unknown subcircuit messange.....i dont know how to find anything on the yahoo spice website
 

SgtWookie

Joined Jul 17, 2007
22,230
Save CD4000.lib in your \Program Files\LTC\SwitcherCad\lib\sub directory.
Download CD4000.zip.
Unzip that file into \Program Files\LTC\SwitcherCad\lib\sym\CD4000

I don't care to use those symbols with the .i, so I created a subdirectory .i, and moved all of those files into the .i subdirectory.

Read the help.txt file.
Download the 74HC files as well, and read the help.txt file for them.
 

Thread Starter

brandonb

Joined Nov 14, 2010
9
sarge i keep getting the unknown subcircuit message what am i doing wrong- it would be awsome if i could get this working as the 4000series are the components i use in my circuits
 

Thread Starter

brandonb

Joined Nov 14, 2010
9
sarge the deal about the subciruit cant be found message- i think it has to do with the 4000.lib file- i dropped it into the sub folder, but all the white pape icons say sub below them and the 4000.lib says lib....i tryed to open that file but its a document spreadsheet and cant drag- i cant seem to be able to post attachements or i would show you whats going on- thanks for helping me with this
 

SgtWookie

Joined Jul 17, 2007
22,230
That's odd.

Perhaps your symbols don't have cd4000.lib on the ModelFile line in Attributes?

Try adding a SPICE directive:
.inc cd4000.lib
in your schematic diagram. You can copy the above line, and paste it into a Spice directive box in LTSpice. You get the Spice directive box by clicking the .sp icon on the menu bar over on the right end.
 

Thread Starter

brandonb

Joined Nov 14, 2010
9
sarge- that worked- i add that directive to the diagram and all seems well- what does that mean if it works with spice directive only? huge thanks to you on that one and also to ron
 

SgtWookie

Joined Jul 17, 2007
22,230
Brandonb,
It means that the .asy files (symbols) don't have a ModelFile entry in their Attributes to tell LTSpice that they need to reference cd4000.lib in order to get the definitions for the sub-circuits (.SUBCKT ) and model (.MODEL) statements that describe how the part is supposed to work.

The .inc cd4000.lib Spice directive tells LTSpice that in addition to whatever .sub and .lib files you're looking in for .MODELs and .SUBCKTs in, look in the cd4000.lib file, too.

You can look at the .sub and .lib files using Notepad; they're just text files. The contents of .sub and .lib files look more or less like gibberish until you start going through the LTSpice Help file, and see what all that stuff means.

Just don't change anything in those files until you're really certain of what you're doing, or you may cause some really odd errors to occur - or "break" it altogether.
 

Thread Starter

brandonb

Joined Nov 14, 2010
9
sarge- im gonna play it safe and use the spice directive on the 4000 library- is there anyway i can save that directive somewhere to copy it or save it in the spice program so i can run that directive when needed?
 

SgtWookie

Joined Jul 17, 2007
22,230
Well, if you wanted to take the time, you could edit each and every cd4xxx.sym (symbol) file, edit the attributes, and put cd4000.lib in the SpiceModel textbox.

I suppose you could save a schematic (.asc) file named cd4000 that only had the
.inc cd4000.lib
directive, and load that file and save it as something else each time you wanted to use a 4000 series CMOS part.

If you start using LTSpice pretty frequently, these kinds of things will sort of become 2nd nature to you. It might seem awkward at first, but once you get the basics down, it gets a good bit easier.
 

frogndog

Joined Jan 30, 2012
2
In the Digital Component selection window, there is the behavioral xjkflop. See the Help file under Special Functions for instructions on how to use behavioral digital components. Some of this is undocumented. Come back with any questions you have.
In the CD4000 library, there is CD4027.
In the 74HC library, there is 74HC107 and 74HC109. Also see the 74HCT library.
See screen captures of these windows in the attachments below.
The behavioral digital components are installed with LTspice when you first download it. If you don't have the other libraries, get them from the Yahoo LTspice group. You will have to join first.
Hi Ron
I cannot access the xjkflop as it is not in my library, what can I do?
 

frogndog

Joined Jan 30, 2012
2
There is no mention of 'Special Functions' for behavioral components in my help file.
I've noticed that your Top Directory looks like....
C:\Program Files\LTC\SwCADIII\lib\sym\Digital\
Wher as my Top Directory looks like...
C:\Program Files\LTC\LTSpiceIV\lib\sym\Digital\
Does this make any sense?
 

SgtWookie

Joined Jul 17, 2007
22,230
Look under "A. Special Functions" in the Help file.

Linear Technology decided to rename the subdirectory from SwCADIII to LTSpiceIV when they went from version 3 to version 4. It doesn't really matter; you just go ahead with the latter name.
 

Papabravo

Joined Feb 24, 2006
21,159
No they are not.
Yahoo abandoned the whole groups thing a couple of years ago. The folks who ran the Yahoo group migrated everything to groups.io
Here is a link:
https://groups.io

In Bordodynov's Library you will find: 74HC107, 74HC109, and 74HC112
In 4000 series CMOS se CD4027, CD4095, CD4096
http://bordodynov.ltwiki.org/
You want the first listed file on the list, it is 16+ Megabytes long
 
Last edited:
Top