Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

need vhdl code for 0-99 bcd counter 7-seg display code

Status
Not open for further replies.

tubreh

Newbie level 2
Joined
Jul 28, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,290
hi all
i need vhdl code for 0-99 bcd counter 7-seg display code Changed by pressing the Button
tanx
 

Well, think about the basics. What do you need?
1. A 'ones' counter. Incremented at a clock. Ranging from 0..9
2. A 'tens' counter. Incremented when the 'ones' counter becomes 0. Ranging from 0..9
3. A 'translator' that converts the 'ones/'tens' value into a corresponding 7-segment code.

All these should be really straight-forward to think of. Very basic stuff.
To give you an idea, here is some pseudo code (unchecked):

Code:
process (clk)
if rising_edge(clk) then
  if ones = 9 then
    ones = 0;
    if tens = 9 then
      tens = 0;
    else
      tens <= tens + 1;
    end if;
  else
    ones <= ones + 1;
  end if;
end if;
end process;

with ones select
  7seg_lsb <= ".." when 0,
                   ".." when 1,
                   ....;

with tens select
  7seg_msb <= ".." when 0,
                   ".." when 1,
                   ....;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top