Please see in this simulation at 5ms: no response of dflop to the clock edge (plus some strange ripple after 3ms).
Many thanks and best regards,
Pietro Grazia
Please see in this simulation at 5ms: no response of dflop to the clock edge (plus some strange ripple after 3ms).
Many thanks and best regards,
Pietro Grazia
Hi idontknow ,
Here is the condition that had happened your simulation, since we left D Pin grounded, hence, we set it as a don't care.
Now with the remaining condition, the most dominant logic here, since you are using it, is the PRE pin, as long as the PRE pin is triggered high, the output of the D-FLOP will remain high, regardless of a low logic on the CLK pin, the only way to pull this pin low is to trigger the CLR pin to high, hence, this will make the output of the D-FLOP low, to make it high again, a HIGH pulse of clock and a LOW clear or a HIGH PRE pin would be needed.
I was also able to remove the ringing on the output of the D-FLOP by changing the TRISE and TFALL into a TAU instead, the TAU value is the Rise time and fall time of the RC output of the FLOP.
Also, Please do not forget to GROUND your Logic Circuits and Flops. (See screenshot below)
Best Regards,
Earl
Hi idontknow ,
Here is the condition that had happened your simulation, since we left D Pin grounded, hence, we set it as a don't care.
Now with the remaining condition, the most dominant logic here, since you are using it, is the PRE pin, as long as the PRE pin is triggered high, the output of the D-FLOP will remain high, regardless of a low logic on the CLK pin, the only way to pull this pin low is to trigger the CLR pin to high, hence, this will make the output of the D-FLOP low, to make it high again, a HIGH pulse of clock and a LOW clear or a HIGH PRE pin would be needed.
I was also able to remove the ringing on the output of the D-FLOP by changing the TRISE and TFALL into a TAU instead, the TAU value is the Rise time and fall time of the RC output of the FLOP.
Also, Please do not forget to GROUND your Logic Circuits and Flops. (See screenshot below)
Best Regards,
Earl
Dear Earl,
many thanks for your very fast reply.
I now tested the circuit with D conncted to CLR and it responds correctly to clock.
In any case, ground is a regular logic level: in order to simulate the real logic i think better not assume ground as dont'care.
Thanks again about TAU (a mysterious not so documented parameter).
Best regards,
Pietro Grazia
Sorry for the confusion on the "Don't Care" statement I made. I just happen to designate it as a don't care as in the situation of when you ground the D Pin, its a low logic.
Great that this works for you now.
Best Regads,
Earl
Dear Earl,
sorry to insist (but feel free to ignore this message).
If CLK is connected to GND the synchronous part of DFLOP never works and can be ignored, but this is not true for D.
The circuit i sent (althoug unusual) can well illustrate this case.
Many thanks for your attention and best regards,
Pietro Grazia
Idontknow,
The DFLOP is one of LTspice's "Special Function" circuit elements. Read LTspice's Help page for those elements ("A. Special Functions"), where it describes the behavior of grounded pins with those special parts. A grounded pin, one that is directly connected to GND, is removed from the code, so it is indeed ignored. That is very different from a logic 0. This is the desired behavior of these parts - a bit unusual, to be sure, but it is purposely done this way.
If you wish a pin to be tied low, connect it to GND through a resistor, so that the pin itself is not directly grounded. Or to a 0 V voltage source. Then it works like you wanted it to be.
A bit of history for you: These "Special Functions" exist to construct more complicated logic. They were not really intended to replace actual physical parts such as real DFLOPs, but they can emulate them if you know what you're doing. Also, they were not originally intended to be used by regular LTspice users, but were "for internal use only" by LTspice's developers. After some time, the developers changed their minds and made them public. This might help to understand why they work the way they do.
By the way, the special connection that works this way is not actually to GND, but to the "common" pin of the Special Function part, which is usually the lower left corner of its symbol. They are the pins Earl circled in that picture a few replies back. If you connect nothing to that pin, it defaults to GND anyway, so it is not actually necessary to ground it yourself, but it is not a bad idea. Anyway, if that "common" pin is either floating, or grounded, as it almost always is, then the other pins will be ignored if they connect to either ground, or left floating (no wire whatsoever touching them).
Andy