3
\$\begingroup\$

for my school project i have to use Proteus to design my circuit. My professor told us that we cannot use any flip-flops and if we had to use them we should make them by using logic gates. I'm trying to make JK flip flops but I'm getting gray signals in the areas shown in picture. Can someone help me how can I get this flip-flop to work?

JK Flip Flop

\$\endgroup\$
11
  • \$\begingroup\$ What does gray signal mean? Why is that bad? What logic gate types those are, 74, 74LS, 74HC, some other type? \$\endgroup\$
    – Justme
    Commented May 23, 2020 at 10:01
  • \$\begingroup\$ @Justme I used the one Digital Primitive ones that came with Proteus, their names are AND, NOR, AND_3 etc. \$\endgroup\$
    – Fingol31
    Commented May 23, 2020 at 10:05
  • \$\begingroup\$ @Justme Gray signal means unknown signal so it's neither 1 nor 0 \$\endgroup\$
    – Fingol31
    Commented May 23, 2020 at 10:05
  • \$\begingroup\$ Undefined state has to be defined First. Then it will work.. Wait i'll write an answer. \$\endgroup\$
    – Sadat Rafi
    Commented May 23, 2020 at 10:09
  • 1
    \$\begingroup\$ @SadatRafi If there is a loop, then the circuit is wrong. \$\endgroup\$
    – user110971
    Commented May 25, 2020 at 20:42

1 Answer 1

1
\$\begingroup\$

Can someone help me how can I get this flip-flop to work?

With J and K inputs set high (red squares) the output of a JK flip flop is not truly defined - it is in the toggle condition and, the current state of its outputs is defined by the earlier values of \$Q\$ and \$\bar{Q}\$ on the previous clock edge: -

enter image description here

Picture link.

So, maybe that is what the grey squares are telling you?

Maybe you need to add a preset input to define the initial state as in this SR flip-flop: -

enter image description here

Picture link.

Or as per this alternative version of the JK flip-flop: -

enter image description here

Link address.

\$\endgroup\$
4
  • \$\begingroup\$ But the question is about how to simulate it. I am trying his T flipflop to run in proteus. But it is not working in any way. \$\endgroup\$
    – Sadat Rafi
    Commented May 23, 2020 at 11:01
  • 1
    \$\begingroup\$ @SadatRafi the question is Can someone help me how can I get this flip-flop to work?. Please leave your answer when you get your simulation working. \$\endgroup\$
    – Andy aka
    Commented May 23, 2020 at 11:03
  • \$\begingroup\$ @Andyaka hi, thanks for the answer! I added a preset and clear input like you showed in the picture but as soon as I turn preset to 0 Proteus gives me an error saying "Logic race condition detected during transient analysis." \$\endgroup\$
    – Fingol31
    Commented May 23, 2020 at 11:13
  • \$\begingroup\$ @Fingol31 keep at it is my advice - it might be a quirk of Proteus. I'm not in any way an expert on Proteus so I can't say. \$\endgroup\$
    – Andy aka
    Commented May 23, 2020 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.