state transition diagram for jk flip flops

Discussion in 'Homework Help' started by dnguyen5, Apr 24, 2008.

  1. dnguyen5

    Thread Starter New Member

    Apr 24, 2008
    2
    0
    I'm having difficulty with this problem.

    using a synchronous controller with jk flip flops, a device is to turn whenever it hits an object. on the front of the device, there is a sensor whose output is "1" whenever it hits an object and "0" in any other case. It has two control lines; turn left and turn right until no object is in the way. when device hits an object it should turn right until no object is in the way. The next time it hits an object, it should turn left until it is clear of the object and repeats.

    Can anyone help me with state transition diagram or how to setup the problem?
     
  2. dnguyen5

    Thread Starter New Member

    Apr 24, 2008
    2
    0
    The state diagram must also be a Mealy state diagram.

    Everytime i set up the problem my states don't go through the proper states and it ends up going right...then right and left depending on the input
     
  3. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    You have 3 output states: Straight, Left, Right. But to make it easier, you should actually use 4 states: Straight1, Left, Straight2, Right.

    Code ( (Unknown Language)):
    1.  
    2. [FONT=Courier New]Current State     Sensor Input    Next State[/FONT]
    3. [FONT=Courier New]Straight1              0           Straight1[/FONT]
    4. [FONT=Courier New]Straight1              1           Left[/FONT]
    5. [FONT=Courier New]Left                   1           Left[/FONT]
    6. [FONT=Courier New]Left                   0           Straight2[/FONT]
    7. [FONT=Courier New]Straight2              0           Straight2[/FONT]
    8. [FONT=Courier New]Straight2              1           Right[/FONT]
    9. [FONT=Courier New]Right                  1           Right[/FONT]
    10. [FONT=Courier New]Right                  0           Straight1[/FONT]
    11.  
    Does that help?
     
Loading...