simulation model for parallel in serial out - Page 1
Forum section: electronics / projects

author: joniengr081
author_rank: Regular Contributor
timestamp: October 24, 2023, 02:23:25 pm
content: Hello,I am wondering if we can run simulation using HEF4021B.https://assets.nexperia.com/documents/data-sheet/HEF4021B.pdfCan we simulate in LT Spice if SPICE model if available for HEF4021B ?

author: Ian.M
author_rank: Super Contributor
timestamp: October 24, 2023, 03:16:07 pm
content: Yes, but the problem is finding a CMOS 4021 SPICE model at all, let alone a LTspice specific model (using LTspice's proprietary logic A devices) that would be required for efficient simulation.You could 'roll your own' behavioural model using hierarchical schematics and A devices (see help file), but there's a lot of work required to get realistic propagation delays and input and output characteristics.

author: joniengr081
author_rank: Regular Contributor
timestamp: October 25, 2023, 09:14:51 am
content: I actually want to perform logic simulation. I am not sure which logic simulator I can use. I think SPICE models are for circuit simulations which I think I don't need. But which model do I need to perform logic simulations with digital devices ?

author: HarryDoPECC
author_rank: Regular Contributor
timestamp: October 26, 2023, 01:52:15 am
content: Perhaps you want something more like:https://github.com/logisim-evolution/logisim-evolution

author: themadhippy
author_rank: Super Contributor
timestamp: October 26, 2023, 03:59:17 am
content: If its basic simulation what abouthttps://www.falstad.com/circuit/circuitjs.html

author: joniengr081
author_rank: Regular Contributor
timestamp: October 26, 2023, 06:18:13 am
content: Thanks for comment. Do we have freeware version of logisim to simulate digital ICs.

author: joniengr081
author_rank: Regular Contributor
timestamp: November 04, 2023, 07:33:59 am
content: I usually work with LT Spice. Can you please confirm that we can also use LT Spice for logic simulation if we have the correct model for the digital logic device.

author: RoGeorge
author_rank: Super Contributor
timestamp: November 04, 2023, 10:07:18 am
content: Certainly LTspice can be used to simulate a 4021.However, that particular shifting register is not in the CD4000 libs. Here is the first result for searching 'simulate HEF4021B ltspice', a CD4021 model for LTspice:https://forum.allaboutcircuits.com/threads/simulation-model-for-parallel-in-serial-out.196773/but I don't have an account there, so I can't download/test the model files.These might help, too, they are general instruction for using the CD4000 lib:https://acidbourbon.wordpress.com/2021/06/30/using-cd4000_v-lib-in-ltspice/Since the datasheet of HEF4021 shows the gates schematic of the chip, you can always use generic D-type FF and generic gates from the standard LTspice, to make your own 4021 model, then pack it as a lib or as subcircuit.

author: Ian.M
author_rank: Super Contributor
timestamp: November 04, 2023, 07:23:33 pm
content: If you *MUST* simulate digital logic with LTspice,(usually only worth doing if you need mixed signal simulation e.g. if you are using RC delays or other analog components), the LTspice waveform viewer sucks, with all the digital traces overlaid unless you manually edit them to add a vertical offset, or put them in separate plot panes.Helmut Sennewalddeveloped a work-around: components that scaled and offset logic signals for stacked display as traces in 1V 'bands' in a LTspice plot pane. They were originally published (asdview5.asy,dview10.asyanddview.lib) to the Independent LTspice Users' Group (at that time a Yahoo group), and can be found at LTwiki.org (use Google).My demo, stacked logic traces in top pane, original overlaid mess belowI extended them for different numbers of signals, modified them to make the scaling easier to set, and to get the traces in the same order as the channels on the symbols, and have attached them and a simple usage demo here.Edit: I've just noticed I've got a filename case problem. Its not an issue for LTspice on Windows, but OSX and possibly Linux users may need to renamedviewX.libtoDviewX.libto match the case of the name in all the symbols!