0
\$\begingroup\$

I am currently working on a traffic light system, the state transition table developed for the project reads as follows:
enter image description here
I have additionally used Neeman's Digital software to create a table (and K-Maps) for the output F2, F1, and F0.

As I was trying to repeat the process for D2, D1 and D0, with a table that has the following appearance. I would like to clarify that the Input I is being represented by E in the table.
D truth table

Which returns the following expressions for the output expressions:
x expressions

I have also tried replacing the x with 0 and get the following output expressions:
0 expressions

Both these aproaches revealed insufficient, because only F0 (the GREEN light) gets lit up, even when Input is true. I would therefore like help resolving this issue.
Thank you very much.

\$\endgroup\$
6
  • \$\begingroup\$ What is clocking the flip flops? What is stopping you from using a counter? Or a microprocessor? \$\endgroup\$ Commented Jan 24, 2024 at 5:00
  • 1
    \$\begingroup\$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. \$\endgroup\$ Commented Jan 24, 2024 at 5:14
  • \$\begingroup\$ Welcome to SE/EE! Please take the tour to learn how this site works, and read "How to Ask". This is not a forum. \$\endgroup\$ Commented Jan 24, 2024 at 6:53
  • \$\begingroup\$ Basically you can use a synchronous counter with synchronous reset and some combinatorial logic. You can even build the counter from 3 D flip flops (as you correctly assume) and some combinatorial logic. -- Using a K-map is perfectly fine, and you might want to do some research on finite state machines. -- I and Sn are your inputs, Sn+1 (= D) and F your outputs. -- Now start and if you stumble with a specific issue, edit your question and clarify. \$\endgroup\$ Commented Jan 24, 2024 at 6:53
  • \$\begingroup\$ Nobody does stuff like this in discreet logic any longer. Any tired old MCU will moonwalk past all your Karnaugh maps and flip flops. It's some 15 mins of work to hack down if you know C programming. \$\endgroup\$ Commented Jan 24, 2024 at 7:23

1 Answer 1

3
\$\begingroup\$

to start

I believe you have correctly drawn out a viable table with everything you need. I can't argue with it. But it appears you need help with k-maps. So let's get going on that.

(In the following, I'm using a tool called Neemann's Digital.)

RED k-map

The k-map for the RED LIGHT is probably easier to see and make from your table:

\$\quad\quad\quad\quad\quad\$ enter image description here

Here's what the above might look like as a start for your circuit:

enter image description here

GREEN k-map

The k-map for the GREEN LIGHT is only slightly harder to see by eye:

\$\quad\quad\quad\quad\$ enter image description here

But you know that it must only the case for \$\overline{S_2}\: \overline{S_1}\: \overline{S_0}\$, too, because of how you designed things. So it's not difficult to work out the above k-map from that knowledge.

Here's the newly modified circuit to include that light:

enter image description here

RED k-map you produced

But let's stop for a moment and look at what you actually produced for your RED table (newly updated in your question -- thanks):

enter image description here

It's not correct. I'm not sure how you created your table on the left side there. But you missed a lot. Do you see how it is really just \$S_2+S_1 S_0\$?

(This is just doing it by eye. But it's also not hard to see.)

automated tool

Perhaps you would like to use an automated tool for this work, instead?

Let's take a moment's break and grab up a copy of Neemann's Digital.

Then you may access the following service it offers:

enter image description here

This will pop up a starter dialog for you that looks like this:

enter image description here

Right-click on the titles to change them (note that using an underscore in the name causes the following text to appear as a subscript):

enter image description here

Then add another input variable:

enter image description here

Unfortunately, this adds it to the end of the current list (and gives it a default name, which you need to rename as well.) So move it to the front:

enter image description here

Now rename the output column Y to RED and add more output columns:

enter image description here

Your table might now look like this:

enter image description here

At this point, start marking the values in the output columns. For example, this is what it looks like when modifying the GREEN column to make it a 1:

enter image description here

When done, you should have the following table completed:

enter image description here

Then select the k-map option:

enter image description here

Then you can work through that to find:

enter image description here

This is a little more nuanced than what I produced above, as it includes the don't care states for state 7.

If you now use the following table service:

enter image description here

It will generate the logic for the above in a separate instance of Digital:

enter image description here

On the left side above is what Digital generated, directly, using AND/OR logic.

Clearly, also, the inputs will instead be coming from the D FFs you already know you need to set up. So on the right side I've added those, by hand.

summary

At this point, I think I've carried you far enough along. You should be able to generate your own table for creating the inputs needed for the D FFs. If you followed the above process, all you need to do is now add three more output columns to represent the next state in your table. Then correctly fill them out. (If you want, you can reorder the output columns, too.)

I also would suggest that you play with some of the other options you have available in Digital, too. I've only touched upon a few of your choices. For example, Digital will generate CUPL or JEDEC code that can be used to program a GAL16V8! Explore.

\$\endgroup\$
17
  • \$\begingroup\$ I provided context and the current KMaps I have, I had to put them into excel and took me longer to do so, I apologize. @periblepsis \$\endgroup\$ Commented Jan 24, 2024 at 12:40
  • \$\begingroup\$ I would create a synchronous sequential network by configuring the flip flops in toggle mode. Then I would determine the logical networks for the individual traffic lights by considering the transition table of the Q outputs or even the D inputs and the I switch. \$\endgroup\$ Commented Jan 24, 2024 at 16:08
  • \$\begingroup\$ @ramwen0 You may want to capture the information here and include it into your first question, as clarifying it. I can either add another answer there or else edit my existing answer. Or I can just edit here. Either way, it seems you may need help with k-maps. \$\endgroup\$ Commented Jan 24, 2024 at 17:02
  • \$\begingroup\$ @ramwen0 In your newly added tables for RED, GREEN, and YELLOW, is E the same as you earlier wrote as I? \$\endgroup\$ Commented Jan 24, 2024 at 17:48
  • 1
    \$\begingroup\$ @ramwen0 I want you to learn and succeed well. Best wishes. (It's up to you whether or not you select my answer. I don't care either way. It's just bookkeeping.) \$\endgroup\$ Commented Jan 24, 2024 at 19:20

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.