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.

help with binary decoder

Status
Not open for further replies.

tetooo

Newbie level 3
Joined
Jul 3, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,306
hi all;

i have this code for a 5-bits binary counter :


LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.numeric_std.all;
ENTITY counter IS
PORT ( count : OUT unsigned (4 DOWNTO 0);
load : IN STD_LOGIC;
pre :IN unsigned (4 DOWNTO 0);
Clk : IN STD_LOGIC);
END counter;
ARCHITECTURE Behavioral OF counter IS
SIGNAL c : unsigned(4 DOWNTO 0) := "00000";

BEGIN
count <= c;
PROCESS(Clk)
BEGIN
IF( rising_edge(Clk) ) THEN
IF(load = '1') THEN
c <= pre;
ELSE
c <= c + 1;
END IF;
END IF;
END PROCESS;
END Behavioral;


I want to connect the output to a binary decoder that shows the state of the counter
how can i do that?

can any one help me plz
 

without knowing what you're trying to decode it into, we cant really help.
This code already outputs the count value, so you just need to decode it externally
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top