0
\$\begingroup\$

well I'm working on 4 way traffic light project with pedestrian signals which professor give to me. First I started with defining the problem and figuring out how many states I need. So I came to conclusion that I need 8 states but there are 20 input output variables(or whatever they are called). And I get stucked, I don't know what to do next ? In school we learned that when working with flip-flop counter if we have 3 input variables then we will have 8 different states, but now I have 20 input variables which means I would have just over one milion states. And also we learned about decoder, in that case table will be more or less the same but I will have 20 K-maps (since there are 20 input variables, right ?).

So my questions is: Is there any way where I can reduce numbers of states when assigning to flip-flop or should I use decoder for that ?

\$\endgroup\$
8
  • \$\begingroup\$ @12Lappie I think I'm getting this all wrong. Well it is not 20 input variables it is output variables, since one of them needs to be 1 to be red on traffic lights. Decoder will help now ? \$\endgroup\$
    – belmo
    Commented Mar 7, 2017 at 20:37
  • \$\begingroup\$ You may be able to combine some inputs - for the pedestrian inputs, if you have signals for "north side, eastbound", "north side, westbound", and similar for south side, you can combine those four signals into one input for your logic. Likewise for northbound/southbound. \$\endgroup\$ Commented Mar 7, 2017 at 20:40
  • \$\begingroup\$ @Steve Hmm, I can't figure out what is the right "formula" of that \$\endgroup\$
    – belmo
    Commented Mar 7, 2017 at 20:41
  • \$\begingroup\$ @PeterBennett I edited my question, my bad. Its outputs \$\endgroup\$
    – belmo
    Commented Mar 7, 2017 at 20:43
  • \$\begingroup\$ Bud, relax, sit down and do it yourself... Define the inputs. Next define the outputs. Now add a clock (what is the shortest transition or sampling period.) Share these with us and we will assist if you get stuck. \$\endgroup\$
    – skvery
    Commented Mar 7, 2017 at 20:44

1 Answer 1

0
\$\begingroup\$

Generally when the input variables are so high, there are a lot of outputs when some inputs take the "don't care" state. This just means it can be either 1 or 0 and the output will remain same.

Using this, you can drastically reduce your truth table size from over a million entries to a manageable number. You should first list down all the distinct possible outputs of your system (8 states as you mention), and then see which inputs will create such an output i.e. assign each of the 20 inputs either '1','0' or 'X' (don't care).

This will help you identify which output variable depends on which input, and hence you can build smaller K-maps for these outputs using those specific inputs.

Also, I think it may help if you build a state transition diagram instead of using decoder tables, but you need to give some more details for a definite answer.

\$\endgroup\$
2
  • \$\begingroup\$ Well, thanks for the answer but I made a mistake, its not inputs its outputs. \$\endgroup\$
    – belmo
    Commented Mar 7, 2017 at 20:44
  • \$\begingroup\$ Ahh, so you no longer have more than a million conditions to analyse. @belma that should make things easy. \$\endgroup\$
    – udiboy1209
    Commented Mar 8, 2017 at 5:08

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.