Academic question about wiring a D-type flip flop from discrete MOSFETs  - Page 1
Forum section: electronics / beginners

author: JoeN
author_rank: Frequent Contributor
timestamp: March 16, 2015, 03:23:48 am
content: This is a follow up from my earlier thread "Academic question about wiring a logic gate from discrete MOSFETs" (https://www.eevblog.com/forum/beginners/academic-question-about-wiring-a-logic-gate-from-discrete-mosfets/). I was able to get the AND and OR gates working with your advice. Now I am trying a D-type flip flop and this one is not working so well for me. I am going off the schematic from Wikipedia (http://en.wikipedia.org/wiki/Flip-flop_%28electronics%29) which I display below. I take the transistors near the top of the schematic with their arrows pointing inwards as P-channel MOSFETs with the source on the arrow and the transistors more to the bottom of the schematic with their arrows pointing outwards as N-channel MOSFETs also with the source on the arrow. I use N7000s as N-channel and and BS250s as P-channel again. I am reading this schematic, correctly, right? Any problem with the schematic itself? It doesn't seem to work for me whereas the three gates all worked fine.Any ideas? Am I insane for doing this? I just want to make sure I understand what is going on here and obviously I don't yet.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 16, 2015, 06:31:05 am
content: That's a dynamic logic gate. The article isn't very clear on this, especially in calling it a "true ... flip-flop".It might work at high frequencies, but it will certainly not work under DC conditions, on the breadboard.The most glaring omission is the lack of positive feedback from the output (Q, \Q) and the apparent short circuit between \R and the rightmost CLK when the second floating node is high. \Q is also unbuffered, a bizarre statement to make if it is also a floating node.You'll have much better results with the discrete gates approach,http://en.wikipedia.org/wiki/File:D-Type_Flip-flop_Diagram.svg. That implementation is correct and static.Tim

author: JoeN
author_rank: Frequent Contributor
timestamp: March 16, 2015, 07:17:14 am
content: Quote from: T3sl4co1l on March 16, 2015, 06:31:05 amThank you. I had wondered about the lack of feedback myself since feedback is the hallmark of flip-flops and yet there is none in this circuit. But I figured, wrongly, that Wikipedia and other sources were giving a correct implementation that somehow made it work without feedback, i.e. it had optimized the feedback away when the implementation went from the gate level to the discrete transistor level. The reason I went with this one is pure laziness - the implementation using gates requires many more transistors (I count 36).One thing I don't understand, though, is how can something like this work at high frequency but not low frequency? I get how that can happen with DRAM because it is assumed they will be refreshed by dedicated circuitry. How could this implementation be used for flip-flops within a larger circuit and how would the larger circuit keep the values straight? For example, if this implementation was used for a register that rarely changed. Will this implementation work if the clock is run fast enough? (I could test that). I don't get it and I would love an explanation if anyone wants to take a crack at it.

author: photon
author_rank: Frequent Contributor
timestamp: March 16, 2015, 08:14:15 am
content: Quote from: JoeN on March 16, 2015, 07:17:14 amThe standard mos flop built with transistors is explained here:http://www.learnabout-electronics.org/Digital/dig55.phpThe implementation shown in Fig. 5.5.2 has 14 transistors.

author: JoeN
author_rank: Frequent Contributor
timestamp: March 16, 2015, 08:32:06 am
content: Quote from: photon on March 16, 2015, 08:14:15 amI count a buffer, three inverters, two transmission games. So 4 transistors for the buffer, 2 each for the inverters and transmission gates = 4 + 3*2 + 2*2 = 14, right? I think I will try this circuit out and see how well it works for me. Thank you. I haven't needed a buffer yet but this is the implementation I am seeing:That is a very nice site you linked me to. Thanks.