Hi
I have the following code to count till 59. It starts off fine but after 31, starts to show ASCII characters like '(', '$', '#' etc., instead of numbers. Any idea where I'm going wrong?
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.numeric_std.all;
entity counter is
port(clk: IN STD_LOGIC;
secs:OUT INTEGER RANGE 0 to 59);
end counter;
architecture counter_behav of counter is
signal countSVal: INTEGER RANGE 0 to 59:=0;
begin
process(clk)
begin
if(rising_edge(clk)) then
if(countSVal>=59) then
countSVal <= 0;
else
countSVal <= countSVal + 1;
end if;
secs <= countSVal;
end if;
end process;
end counter_behav;