VHDL Code for binary/Gray counter help please

Discussion in 'VHDL' started by baigsku, Dec 14, 2009.

  1. baigsku

    baigsku

    Joined:
    Dec 14, 2009
    Messages:
    1
    Likes Received:
    0
    Hello

    Can any one please send me the vhdl code for a state machine that counts up in binary froom 0 to 7 when the control input is a '1' and in a gray code sequence when the control is a '0'

    Up sequence is 000,001,010,011,100,101,110,111

    Gray Sequence: 000,001,011,111,101,100,110,010


    Many thanks

    baig
     
    baigsku, Dec 14, 2009
    #1
    1. Advertisements

  2. baigsku

    joris

    Joined:
    Jan 29, 2009
    Messages:
    152
    Likes Received:
    0
    I think the easiest solution would be to internally only count in binary, and only outputting as gray code if requested.
     
    joris, Dec 14, 2009
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. The Eeediot
    Replies:
    3
    Views:
    2,528
    =?Utf-8?B?UnVsaW4gSG9uZw==?=
    Dec 22, 2004
  2. KK
    Replies:
    2
    Views:
    1,070
    Big Brian
    Oct 14, 2003
  3. Srinivas Rao \(Rbin/eds2\)

    gray code

    Srinivas Rao \(Rbin/eds2\), Oct 22, 2003, in forum: C Programming
    Replies:
    6
    Views:
    3,232
    Dave Von Pless
    Oct 24, 2003
  4. Olaf
    Replies:
    4
    Views:
    3,552
    Ahmed Samieh
    Apr 30, 2007
  5. ast

    Gray counter

    ast, Sep 13, 2007, in forum: VHDL
    Replies:
    22
    Views:
    9,218
    omahens
    May 7, 2008
  6. George2
    Replies:
    1
    Views:
    1,046
    Alf P. Steinbach
    Jan 31, 2008
  7. sarovarc

    Gray Code

    sarovarc, Mar 2, 2011, in forum: VHDL
    Replies:
    2
    Views:
    1,836
    Sweta Dauhawoo
    Dec 27, 2014
  8. fofo

    A gray counter

    fofo, Dec 19, 2011, in forum: VHDL
    Replies:
    3
    Views:
    1,555
    eliascm
    Dec 20, 2011
Loading...