0

I have an assignment to design a sequential circuit using T Flip-Flops that travels through the following states (0010, 1001, 0011, 0001, 0100 then repeats again.) I am designing this circuit using the website called "CircuitVerse." I made a circuit with the following equations where 't' means T flip-flop:

tA = (A)+(A'B'CD')
tB = (B)+(A'C'D)
tC = (C'D')+(BC')+(AC')+(A'B'C)
tD = (BD)+(A'C'D)+(ACD)+(A'B'CD')

(The ' stands for complement.)

When I designed this circuit on the website, the states that I get are the following: (0010, 1001, 0011, 0001, 0110). As you may have noticed, I am getting everything right in the sequence, except the 3rd bit in the last state. I have tried to make sure my circuit is built properly and that I didn't mess up any wires. I even checked it again to make sure everything is right, yet I found no problem with my design.

Circuit verse Design

JRE
  • 71,321
  • 10
  • 107
  • 188
  • 4
    seems like you could just go through each block and check that the output is what you expect, and isolate where the error comes from (either your equation or your circuit) – BeB00 Jun 15 '22 at 01:55
  • It is unclear to me. But did you use someone else's software ("circuit verse") to generate a result for your assignment? Or did you develop the state table yourself and convert it to the required k-maps? – jonk Jun 15 '22 at 03:21
  • By the way, I find quite different results for the toggle inputs of the various TFFs. What I find *works*, correctly. Three 2-in AND gates, two 2-in OR gates, and one 3-in OR gate does it. There's no way I'm attempting to decypher that mess you show. So again... how did you create that? – jonk Jun 15 '22 at 05:43
  • @jonk so for your first question yes i did develop develop the state table myself and , can you elaborate on the 2nd question of you finding different results for the inputs of the various TFFs? do you mean that the same TFFs function had different toggle inputs? finally for your question on how i created the circuit , i simply wrote the desired sequence , created a truth table , used k-maps to get each FF function and implemented it on the simulator – skydiver4312 Jun 15 '22 at 08:36
  • @BeB00 i will try doing that – skydiver4312 Jun 15 '22 at 09:02
  • 2
    @skydiver4312 Why not show your work? Not the circuit. I can see that. And you say it doesn't work. But instead show the tables you developed. I can readily show my tables. – jonk Jun 15 '22 at 09:31
  • @skydiver4312 There are 5 output states: {0010 1001 0011 0001 0100}. That means you could consider just three TFFs, as three can represent eight distinct states. Yet you show four TFFs. Why? Also, the default reset state of a TFF is 0. Yet your first state is 0010. To me, this means using the $\overline{Q}$ output of one of the TFFs (or else inverting the $Q$ output with an inverter.) Either way, the resulting states for 4 TFFs (if that's your call) is now: {0000 1011 0001 0011 0110}. That way the reset state is where it needs to be. Yes? – jonk Jun 15 '22 at 09:45
  • Just pause the circuit before the final state and look at the value on each wire. You should be able to trace where the wrong value is coming from. – user253751 Jun 15 '22 at 11:28
  • 1
    The quality of this schematic makes it extra hard to help you – Jens Jun 15 '22 at 15:42

1 Answers1

1

I wish you'd allowed us to see your table-work. But I appreciate the fact that you responded. That fact alone is important to me.

Here's how I would proceed:

Excitation Table

Assuming for now that you must use four TFFs, I find the following state transition table (excitation table) using the modified states I mentioned in earlier comments above, {0000 1011 0001 0011 0110}:

$$\begin{array}{c|c} \text{States} & \text{Excitations}\\\hline\\ {\begin{smallmatrix}\begin{array}{cccc} Q_A & Q_B & Q_C & Q_D\\\\ \vphantom{\left.\overbrace{\begin{array}{ccc}J & K & T & D\end{array} } \right.}\\ 0&0&0&0\\ 1&0&1&1\\ 0&0&0&1\\ 0&0&1&1\\ 0&1&1&0\\ \\ 0&0&1&0\\ 0&1&0&0\\ 0&1&0&1\\ 0&1&1&1\\ 1&0&0&0\\ 1&0&0&1\\ 1&0&1&0\\ 1&1&0&0\\ 1&1&0&1\\ 1&1&1&0\\ 1&1&1&1 \end{array}\end{smallmatrix}} & {\begin{smallmatrix}\begin{array}{cccc} Q_A & Q_B & Q_C & Q_D\\ \left.\overbrace{\begin{array}{cc}T\\\\ 1\\ 1\\ 0\\ 0\\ 0\\ \\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x \end{array} } \right. & \left.\overbrace{\begin{array}{cc}T\\\\ 0\\ 0\\ 0\\ 1\\ 1\\ \\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x \end{array} } \right. & \left.\overbrace{\begin{array}{cc}T\\\\ 1\\ 1\\ 1\\ 0\\ 1\\ \\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x \end{array} } \right. & \left.\overbrace{\begin{array}{cc}T\\\\ 1\\ 0\\ 0\\ 1\\ 0\\ \\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x\\ x \end{array} } \right. \end{array}\end{smallmatrix}} \end{array}$$

The right column of the table shows the T inputs to each TFF. The left column shows the initial state. By taking the initial state and applying the excitations, the next state in the table is achieved.

This should not be difficult to follow. But again do note that for the above table I've modified your states to invert one of the bits. I wanted to avoid using an inverter and instead plan on using the \$\overline{Q}\$ output of one of the TFFs. If the TFFs to be used don't include \$\overline{Q}\$ outputs, then the same process is still followed; but the final combinatorial logic may look a little different and at least one, but probably a few, more inverters would be required.

I've also included (it is necessary) the states that are "illegal" in the sense that they are never to be represented.

From this, it is relatively easy to re-arrange the above table so that it is easier to use when generating the k-maps.

Re-Arranged Excitation Table

Let's list out the excitation table in the order needed for generating k-maps:

$$\begin{array}{c|c} \text{States} & \text{Excitations}\\\hline\\ {\begin{smallmatrix}\begin{array}{cccc} Q_A & Q_B & Q_C & Q_D\\\\ \vphantom{\left.\overbrace{\begin{array}{ccc}J & K & T & D\end{array} } \right.}\\ 0&0&0&0\\ 0&0&0&1\\ 0&0&1&1\\ 0&0&1&0\\ 0&1&0&0\\ 0&1&0&1\\ 0&1&1&1\\ 0&1&1&0\\ 1&1&0&0\\ 1&1&0&1\\ 1&1&1&1\\ 1&1&1&0\\ 1&0&0&0\\ 1&0&0&1\\ 1&0&1&1\\ 1&0&1&0 \end{array}\end{smallmatrix}} & {\begin{smallmatrix}\begin{array}{cccc} Q_A & Q_B & Q_C & Q_D\\ \left.\overbrace{\begin{array}{cc}T\\\\ 1\\ 0\\ 0\\ x\\ x\\ x\\ x\\ 0\\ x\\ x\\ x\\ x\\ x\\ x\\ 1\\ x \end{array} } \right. & \left.\overbrace{\begin{array}{cc}T\\\\ 0\\ 0\\ 1\\ x\\ x\\ x\\ x\\ 1\\ x\\ x\\ x\\ x\\ x\\ x\\ 0\\ x \end{array} } \right. & \left.\overbrace{\begin{array}{cc}T\\\\ 1\\ 1\\ 0\\ x\\ x\\ x\\ x\\ 1\\ x\\ x\\ x\\ x\\ x\\ x\\ 1\\ x \end{array} } \right. & \left.\overbrace{\begin{array}{cc}T\\\\ 1\\ 0\\ 1\\ x\\ x\\ x\\ x\\ 0\\ x\\ x\\ x\\ x\\ x\\ x\\ 0\\ x \end{array} } \right. \end{array}\end{smallmatrix}} \end{array}$$

In the above, all I have done is to re-arrange the rows in the table so that it follows the usual k-map sequence: {00 01 11 10}. (For bit pairs.) As I'm sure you are aware, this aids in grouping regions for figuring out the combinatorial logic.

K-Maps

From the above re-arranged excitation table, four k-maps would then be:

$$\begin{array}{rl} \begin{smallmatrix}\begin{array}{r|cccc} Q_A\text{ }T&\overline{Q_A}\:\overline{Q_B}&\overline{Q_A}\: Q_B&Q_A \:Q_B&Q_A \:\overline{Q_B}\\ \hline \overline{Q_C}\:\overline{Q_D}&1&x&x&x\\ \overline{Q_C}\: Q_D&0&x&x&x\\ \vphantom{Q_C\:\overline{Q_D}}Q_C\: Q_D&0&x&x&1\\ Q_C\:\overline{Q_D}&x&0&x&x \end{array}\end{smallmatrix} & \begin{smallmatrix}\begin{array}{r|cccc} Q_B\text{ }T&\overline{Q_A}\:\overline{Q_B}&\overline{Q_A}\: Q_B&Q_A \:Q_B&Q_A \:\overline{Q_B}\\ \hline \overline{Q_C}\:\overline{Q_D}&0&x&x&x\\ \overline{Q_C}\: Q_D&0&x&x&x\\ \vphantom{Q_C\:\overline{Q_D}}Q_C\: Q_D&1&x&x&0\\ Q_C\:\overline{Q_D}&x&1&x&x \end{array}\end{smallmatrix}\\\\ \begin{smallmatrix}\begin{array}{r|cccc} Q_C\text{ }T&\overline{Q_A}\:\overline{Q_B}&\overline{Q_A}\: Q_B&Q_A \:Q_B&Q_A \:\overline{Q_B}\\ \hline \overline{Q_C}\:\overline{Q_D}&1&x&x&x\\ \overline{Q_C}\: Q_D&1&x&x&x\\ \vphantom{Q_C\:\overline{Q_D}}Q_C\: Q_D&0&x&x&1\\ Q_C\:\overline{Q_D}&x&1&x&x \end{array}\end{smallmatrix} & \begin{smallmatrix}\begin{array}{r|cccc} Q_D\text{ }T&\overline{Q_A}\:\overline{Q_B}&\overline{Q_A}\: Q_B&Q_A \:Q_B&Q_A \:\overline{Q_B}\\ \hline \overline{Q_C}\:\overline{Q_D}&1&x&x&x\\ \overline{Q_C}\: Q_D&0&x&x&x\\ \vphantom{Q_C\:\overline{Q_D}}Q_C\: Q_D&1&x&x&0\\ Q_C\:\overline{Q_D}&x&0&x&x \end{array}\end{smallmatrix} \end{array}$$

TFF Toggle Inputs

From that I find that the toggle inputs to each TFF are:

$$\begin{array}{c|c} & \text{T}\\\hline {\begin{smallmatrix}\begin{array}{r} Q_A \\ Q_B \\ Q_C \\ Q_D \end{array}\end{smallmatrix}} & {\begin{smallmatrix}\begin{array}{c} Q_A \:\lor\: \overline{Q_C}\:\overline{Q_D} \\ \overline{Q_A}\: Q_C\\ Q_A\:\lor\: \overline{Q_C}\:\lor\: \overline{Q_D} \\ \overline{Q_A}\: Q_C\:Q_D\:\lor\:\overline{Q_C}\:\overline{Q_D} \end{array}\end{smallmatrix}} \end{array}$$

Note that this differs from what you wrote and also differs from your schematic.

If you cannot use the \$\overline{Q}\$ output of TFFs (one doesn't exist, for example) then:

$$\begin{array}{c|c} & \text{T}\\\hline {\begin{smallmatrix}\begin{array}{r} Q_A \\ Q_B \\ Q_C \\ Q_D \end{array}\end{smallmatrix}} & {\begin{smallmatrix}\begin{array}{c} Q_A \:\lor\: \overline{Q_C\:\lor\:Q_D} \\ \overline{Q_A}\: Q_C\\ Q_A\:\lor\: \overline{Q_C\:Q_D} \\ \overline{Q_A}\: Q_C\:Q_D\:\lor\:\overline{Q_C\:\lor\:Q_D} \end{array}\end{smallmatrix}} \end{array}$$

I'm stuck about your "logic mess" because I've frankly no clue at all how you arrived at your results. It doesn't follow directly from any procedure I know. So I'm curious how you got there.

Final Result

Applying the above combinatorial logic, I find the following synchronous schematic:

enter image description here

It reproduces: {0010 1001 0011 0001 0100}.

As required.

Using only the \$Q\$ outputs, this would be equivalent:

enter image description here

And no, there is no way I will try to decipher and analyze what you came up with, unless you document your process step by step. I'm just not going to reverse-engineer it.

jonk
  • 77,876
  • 6
  • 77
  • 188