[tag]Ron Fredericks[/tag] writes: I have completed the design and test of a new [tag]component[/tag] for [tag]LTspice[/tag]/[tag]SwitchCAD III[/tag] [tag]circuit simulation[/tag] and [tag]schematic capture[/tag]. In a previous post I discussed my interest in the [tag]74193[/tag] presettable synchronous 4-bit binary up/down counter [tag]IC[/tag] for a digital volume control circuit I am building. The [tag]circuit[/tag] [tag]simulation[/tag] described below focuses on how to simulate the 74HC193 IC, but [tag]timing[/tag] and [tag]voltage[/tag] parameters built into this design allow a designer to easily simulate other variants of this IC from high speed Si-gate [tag]CMOS[/tag] HC and HCT devices to low power [tag]Schottky[/tag] [tag]TTL[/tag] devices.
All circuits related to this 74HC193 simulation are available here>
The 74HC193 Component
See figure 1 below for a screen shot of the completed design. The circuit was built from the digital gates in the component library supplied with the original [tag]Linear Technology[/tag]’s free LTspice tool.
Figure 1 – 74HC193 Circuit and Related Components
View larger image>
To keep the design looking like the original data sheet logic diagram, as published by companies that include NXP Semiconductors and Texas Instruments, a custom “T notS-R FlipFlop” subcomponent and corresponding assembly file was first created. This subcomponent was reused 4 times in the main IC logic diagram. An assembly file called 74hc193.asy was also created. It includes all pins used on the commercial IC except ground and Vcc. The IC’s internal power supply is not simulated by the Linear Technologies’ gates, and so they are not used or required in this design either.
Each gate within the design has a few variables assigned to them so that the IC remains flexible and easy to reuse in new projects:
- tdgate
td (propagation time delay assigned to each gate)
- tdgate2
td (propagation time delay assigned to the D FlipFlop)
- tripdtgate
tripdt (td’s accuracy band assigned to each gate including the D FlipFlop)
- vhighgate
logical high value for each gate and D FlipFlop
- vlowgate
logical low value for each gate and D FlipFlop
These variables can be assigned their corresponding time and voltage values using a .param statement placed in the main circuit. These values are then within scope for automatic reuse by the 74HC193 component and flipflop subcomponent simulations. Below is an example of how parameter assignment can be made (as used in the test circuit described next):
.param tdgate=10n tdgate2=3*tdgate tripdtgate=1n vhighgate=5v vlowgate=0v