Hi, I have an assignment due in which I have the question beneath: Create a Gray Counter that will accept an input value from the user and commence counting from that location displaying the output to an easy to read and see display. As part of this sequence, the count should restart at 0 and continue until either disabled or the clock is stopped Gray Code Sequence for this lab: 0 >1 > 3 > 2 > 6 > 7 > 5 > 4 > 12 > 13 > 15 > 14 > 10 > 11 > 9 > 8 > 0 I missed a few classes and researched gray code but still amn't sure what I'm supposed to do. I'm meant to create a state diagram, a state table and then implement it in Logisim. I think I am meant to use D flip flops to implement the circuit but is my next state always going to be the binary value of the next number in the line? is this correct for the state table? I realize I don't use any D flip-flops but am new to counters. Current State: ***I uploaded the state table as a pdf For the state diagram, it is very similar to the state table, just a continuous circle, that moves to the next state, regardless of the input. Any help would be much appreciated, Thanks
Don't get caught up in names. You have a finite state machine that goes through the sequence of states given. It turns out that that sequence has some interesting properties and applications and therefore has been given a name, but at the end of the day it is just a state machine like any other state machine.
Thank you for your reply, If it is the same as a finite state machine am I able to implement the D flip flop as I have in the pdf?
Isn't a Gray code one where only one bit changes from one state to the next? In your table, I see several places where multiple bits change at the same time?
Yep, except nope. I think you have the general idea, but your dA..dD columns need to correspond to the NEXT state, not the current state.
I'm not seeing that. Could you give an example in the table? Very possible I'm just looking too quickly to spot it.
I was looking from one set of Ds to the next set below it. I now see that the present-state to next-state is ok, but the Ds are all screwed up. Even if each set of Ds is moved one line higher, they still do not include the places where a present-state 1s are preserved in the next-state.
I see what you are saying. In some lines he has the next state and in some lines he has the current state.