A Question about D Flip Flop

Thread Starter

PaulEngineer

Joined Dec 21, 2016
172
Hi everyone

I had a very strange experience yesterday with creating something strange. And the output that was given, was strange too. Why is that happen.. I have attached a circuit where it is explaining a lot of information about this issue..

Well correctly speaking, the output frequency on spice was WAY MORE than 2GHz. The period was even lower than 1nS, even lower than 1pS, even lower than 1fS, and even lower than 1aS. Why?

EDIT: It was like it had frequency towards to Infinity.

EDIT2: Also forgot to say that the square wave generator have the + polarity on the right side, and the - polarity to the left side
 

Attachments

Last edited:

crutschow

Joined Mar 14, 2008
25,982
What is the purpose of the circuit?

That circuit creates an oscillator when the input signal is high, and the output frequency will be limited by the FF model you use.
If the model was ideal, than the frequency would likely be very high.
 

Papabravo

Joined Feb 24, 2006
14,831
Most D-flip-flops have asynchronous SET and CLEAr. Deriving a SET or CLEAR input from Q or Q-BAR is guaranteed to behave in unpredictable ways.
 

dl324

Joined Mar 30, 2015
12,210
the output frequency on spice was WAY MORE than 2GHz. The period was even lower than 1nS, even lower than 1pS, even lower than 1fS, and even lower than 1aS. Why?
What process technology is the flip flop? Femto and atto second rise times aren't easy to achieve; let alone pulse widths in that region.
 

andrewmm

Joined Feb 25, 2011
874
Look at the waveforms !
especially the Pre and Clr ,

These signals are asynchronous,
what do you know about the output of an asyncronous gate say an and gate ?
imagine an and gate , with two square waves of say 1 MHz going into it,
what would you get out if both square waves are exactly in sync
what would you get out if one waveform was 1ns advanced on the other
 

Thread Starter

PaulEngineer

Joined Dec 21, 2016
172
What is the purpose of the circuit?

That circuit creates an oscillator when the input signal is high, and the output frequency will be limited by the FF model you use.
If the model was ideal, than the frequency would likely be very high.
There is no purpose of this circuit. I have made it by accident. My project was to build a clock which would represent Hours Minutes and Seconds. I have made the circuit, and then i realized that one of my FFs was running on a very high Frequency, while i calculated it to be working arround at 4096Hz. I have located that FF and sent that to this forum, to understand why it was running at such a high frequency.

PS... Although I can keep this circuit in my mind, for future use, if for example i would like to make an FM transceiver (not 88-108 MHz, as they are illegal). I'll measure the frequency of that circuit, and if... If it us at least more than 250MHz-500MHz, i can use them, as these frequencies are not illegal in my country.

Last thing, I will send the Screenshot of the waveform from my SPICE, and the Oscilloscope readings.

Anyways, thank you very much.
 

Thread Starter

PaulEngineer

Joined Dec 21, 2016
172
Screenshot_20201230-205422~2.pngScreenshot_20201230-205143.pngScreenshot_20201230-204837.png

As you can see, the 385aS is the minimum allowed reading of the oscilloscope that my Spice could handle. And still the reading is not clear, although my oscilloscope readings are accurate with any circuit i tried before. But this case, is somewhat strange.
 
Last edited:

Papabravo

Joined Feb 24, 2006
14,831
What you have is a mathematical curiosity. It does not represent any objective reality. That period would represent 2597+ THz., a frequency so large that is is not realizable with any known circuit. The frequency of Blue Light is a bit more than one fourth of that value @ 666 THz.
 

Thread Starter

PaulEngineer

Joined Dec 21, 2016
172
What you have is a mathematical curiosity. It does not represent any objective reality. That period would represent 2597+ THz., a frequency so large that is is not realizable with any known circuit. The frequency of Blue Light is a bit more than one fourth of that value @ 666 THz.
Can you explain what you mean in a simple language? I think I've lost you here.
 

Papabravo

Joined Feb 24, 2006
14,831
That's not surprising. A flip-flop with CLEAR or SET inputs derived from the Q or Q--BAR outputs is a nonsensical construct. The time period of your virtual oscilloscope corresponds to an unreasonable frequency for any real circuit. You are in a realm that has no connection with reality. 2597 THz. is the frequency you get from taking the reciprocal of 385 asec, and 666 THz. is the frequency of blue light. There are no circuits or components for that matter that work at those frequencies.
 

Thread Starter

PaulEngineer

Joined Dec 21, 2016
172
That's not surprising. A flip-flop with CLEAR or SET inputs derived from the Q or Q--BAR outputs is a nonsensical construct. The time period of your virtual oscilloscope corresponds to an unreasonable frequency for any real circuit. You are in a realm that has no connection with reality. 2597 THz. is the frequency you get from taking the reciprocal of 385 asec, and 666 THz. is the frequency of blue light. There are no circuits or components for that matter that work at those frequencies.
Hmm I've got your point now. Yeah i would somewhat agree with your state. Anyways, glad this issue has been solved. Anyways, I'll continue my project with the digital clock.
 

Thread Starter

PaulEngineer

Joined Dec 21, 2016
172
Does it look the same with the FF as without the FF? If so, then what does that tell you about the FF?
Yes it does.
This tell me that FF or Spice probably is not working normally, or it's not a good quality Spice? I don't know the answer.. For real. Everything is fine overall... The logic of D FF is working fine.

I don't know, any circuit i used to build previously, were working just like i expected... I dont really know what exactly is the issue... It is on Spice, it is on FF, it is on something else? I don't know... When j tried this circuit on LTspice, the LTspice even refused to get an output... It said there was some kind of error on D FF. I really don't know.
 
Last edited:

RBR1317

Joined Nov 13, 2010
591
This tell me that FF or Spice probably is not working normally, or it's not a good quality Spice?
I think it means that the original design was not using the FF as a FF, but only the few internal gates that go from the CLR input to the Q output (and from the Q' output to the PRE input). HI output on Q causes HI input on CLR which forces Q to go LO. HI output on Q' causes HI input on PRE which forces Q to go HI. So the Q output is always being forced to its opposite state by feedback from the Q output to the PRE/CLR input. Note that an amplifier with 180° phase shift feedback is a description of an oscillator.
(See post #2)
 
Last edited:
Top