Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > VHDL Code for binary/Gray counter help please

Thread Tools

VHDL Code for binary/Gray counter help please

baigsku baigsku is offline
Junior Member
Join Date: Dec 2009
Posts: 1

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

Reply With Quote
joris joris is offline
Senior Member
Join Date: Jan 2009
Posts: 152
I think the easiest solution would be to internally only count in binary, and only outputting as gray code if requested.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page File counter and Private Bytes Counter George2 C++ 1 01-31-2008 09:27 AM
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
VHDL PULSE COUNTER - PLS HELP crazy_kuts VHDL 1 03-30-2006 06:50 PM
Session("counter") vs. ViewState("counter")...a newbie question The Eeediot ASP .Net 3 12-22-2004 09:31 PM
can I do such a simplest counter in VHDL? walala VHDL 3 09-14-2003 08:05 PM