is this program make led dimming from 0 to 100 % brightness ?
PWM_width <= ('0' & PWM_width(5 downto 0)) + ('0' & PWM_adj); -- 0-100% --
if(counter(26)='1')then
PWM_adj <= counter(25 downto 20); -- 0-100% --
else
PWM_adj <= not counter(25 downto 20);
end if;
i try to change range in pwm_adj from 25 downto 20 i think that mean dimming from 0 -100% brightness
then i change it to 23 down to 20 then it's dimming about 0-50% brightness
if i want to want led dimming just only 50% (not from 0 to 50% )what should i do with the counter ??
PWM_width <= ('0' & PWM_width(5 downto 0)) + ('0' & PWM_adj); -- 0-50% --
if(counter(26)='1')then
PWM_adj <= counter(23 downto 20); -- 0-50% --
else
PWM_adj <= counter(23 downto 20);
end if;
LED(0) <= PWM_width(6);
LED(1) <= PWM_width(6);
LED(2) <= PWM_width(6);
LED(3) <= PWM_width(6);