Hello im following the tutorial : http://ngspice.sourceforge.net/ngspice-eeschema.html#digi
I’m trying to make a D Flip Flop. But I’m not having expected results on simulation.
Can you tell me please how i need to configure the CLOCK and DATA pulses and also if i need to insert some parameter to the 74HC00 model?
CIRCUIT:
MODEL (From Tutorial):
*Delays are given for Vcc = 2V/4.5V/6V (HC) from the
*Philips data sheets. http://www.philipslogic.com
* Delays are given for Vcc = 2V/4.5V/6V .
*Used delay: Td = (Tpd-Tr/2)*(4.5-0.5)/(Vcc-0.5)
*The gate delay has to be set to tpd minus 3ns for the input filter
*and another minus 3ns for Trise/2
*td1 = tpd - 3ns - 3ns
.param vcc=5 tripdt=6n
*The 74HCXX gates
*2-input NAND gate
*vcc 2 /4.5/5 /6
*tpd 25n/9n/7n/7n
*tr 19n/7n / /6n
.SUBCKT 74HC00 in1 in2 out NVCC NVGND vcc1={vcc} tripdt1={tripdt}
.param td1={1e-9*(9-3-3)*4.0/(vcc1-0.5)}
.param Rout={60*4.0/(vcc1-0.5)} $ standard output driver
*Cin1 in1 0 3.5p
*Cin2 in2 0 3.5p
abridge2 [in1 in2] [din1 din2] adc_buff
.model adc_buff adc_bridge(in_low = {vcc1/2.0} in_high = {vcc1/2.0})
a6 [din1 din2] dout nand1
.model nand1 d_nand(rise_delay = {td1} fall_delay = {td1}
+ input_load = 0.5e-12)
abridge1 [dout] [out20] dac1
.model dac1 dac_bridge(out_low = 0.0 out_high = {vcc1} out_undef = {vcc1/2.0}
+ input_load = 5.0e-12 t_rise = {tripdt1}
+ t_fall = {tripdt1})
Rout out20 out {Rout}
.ends
RESULTS on comments.
Thank you!