Project

General

Profile

« Previous | Next » 

Revision 258

Added by markw almost 11 years ago

Added reverse option. Yes, pots are a different direction from cx52!! 2600daptor vs 5200daptor

View differences:

common/a8core/pot_from_signed.vhdl
cycle_length : integer := 32;
line_length : integer := 114;
min_lines : integer := 0;
max_lines : integer := 227
max_lines : integer := 227;
reverse : integer := 0
);
PORT
(
......
count_next <= count_reg;
if (pot_reset ='1' or enabled = '0') then
count_next <= std_logic_vector(to_unsigned(to_integer(pos)+128+(line_length*min_lines/count_cycles),10));
if (reverse = 1) then
count_next <= std_logic_vector(to_unsigned(-to_integer(pos)+127+(line_length*min_lines/count_cycles),10));
else
count_next <= std_logic_vector(to_unsigned(to_integer(pos)+128+(line_length*min_lines/count_cycles),10));
end if;
end if;
if (count_enable = '1') then

Also available in: Unified diff