Is it possible to alter the next state of a state diagram?

Discussion in 'The Projects Forum' started by nubpwn3r, Nov 2, 2015.

  1. nubpwn3r

    Thread Starter New Member

    Oct 15, 2015
    15
    0
    Hi guys I am working on the last part of my Traffic Lights Project

    I have a question about the 7476 IC JK Flip Flop
    is it restricted to do down and up counters?

    because I got creative and thought 'is it possible to modify the next state?'
    an example of the state table that I have in mind is this:
    STATE TABLE.PNG

    Now to make it relevant to using it to traffic lights, the reason each Next state only has 1 Active HI Bit is because i will connect it to RED, GREEN, and YELLOW LED's respectively.

    I know I have options like using 4017 IC, but I will also be using a 7 segment, so, that option is not viable.

    Anyone Help?
     
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    If you are building a generic state machine out of flip-flops and gates, then there is no restriction on what the next state can be. You will, however, have to decode the present state in order to form the inputs so that the next state is what you want...
     
  3. nubpwn3r

    Thread Starter New Member

    Oct 15, 2015
    15
    0
    In a decoder, I just input the present state and voila, outputs will come.

    eitherway, ill try that now thanks for the tip,
    be right back
     
  4. nubpwn3r

    Thread Starter New Member

    Oct 15, 2015
    15
    0
    I inputted the present states to the 74138 decoder it didnt work :(
    my desired Present State, Next state is:
    STATE TABLE.PNG

    but after the simulation i just get a Steady HI State in output D from flip flop

    error.png
     
  5. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    Your table isn't going to work very well. Let's assume that you start things off in state 0000. What's the next state that the machine goes to? 0001. What state does it go to after that? 0001. See the problem?
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    Is this a school project assignment?

    If so, the thread can/should be moved to Homework Help -- it will get the attention of people that focus on that sort of thing.
     
  7. nubpwn3r

    Thread Starter New Member

    Oct 15, 2015
    15
    0
    Mhm Im get the point thanks, and after i did a state diagram, so what you are trying to say is that Next states and the next states there after, should not be redundant. I should therefore mix it up.

    And regarding the thread issue, ummm I saw the Header that it is "Projects Forum" and I am working on a project so I posted it here.
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    Saying "mix it up" sounds like a random process. While there is flexibility, there is very little that is random.

    First what you need to do is forget about how the states are encoded. Design your state machine with general state labels such as A, B, C, or S0, S1, S2. You first need to figure out what you need the machine to do, then worry about how you will get it to do it.

    Not unreasonable, but if it is any kind of course work for credit, it really should be over in Homework Help. If that's the case, just say so and I'll gladly move it over there.
     
Loading...