# What would be state diagram of robot controller?

Robot Controller Problem

A computer needs to control a robot, where the computer sends the following commands:

• Do nothing 00
• Turn right 01
• Turn left 10
• Move forward 11

You have to design a circuit that accepts these commands and sends the robot the following signals

• Do nothing 000
• Turn right 001 010 011
• Turn left 101 110 111
• Move forward 100 100

So they respectively take 1,3,3 and 2 clock cycles. Until the current command is completed, don’t take a look at the next input from the computer.

Input

• Clock Pulse CP
• Input Available IA
• Input Command C0, C1

Output

• Output Available OA
• Output Signal S0...S2

Is the state Diagram correct. What would be output values? Or Output is not needed? And What Information is helpful to know in advance for building this project?

• These are much easier to understand if you give meaningful names to the states. Nov 28, 2016 at 13:15
• You're using the 000 state for both the "do nothing" command and for the "no command received" idle state. You need to separate this into two separate states. Remember, you need to include the IA signal in your list of inputs, and the OA signal in your list of outputs. Nov 28, 2016 at 13:26
• @DaveTweed Are you saying that I should make connection of last element of a state(left,right,forward) to "no command received or idle state" instead of 000. Nov 28, 2016 at 15:40
• @DaveTweed How do I stop circuit for looping? For Example If I input 01 it should goes 001 010 011 then back at 000 and should stop. Instead it keeps looping and looping until I changed Input values. Dec 6, 2016 at 15:17
• @ScottSeidman How do I stop circuit for looping? For Example If I input 01 it should goes 001 010 011 then back at 000 and should stop. Instead it keeps looping and looping until I changed Input values. Dec 6, 2016 at 15:17