Implementing a FSM on a PIC

  • Implementing a FSM on a PIC requires you to make a variable to track the current state.
  • Make a #define for each state with a unique integer value.
  • Then set the state to the appropriate #define. For example: state = STATE_READY;