- dat_reg(86 downto 81) <= pwm_match(1)(10 downto 5); --6 MSb of PWM1
- dat_reg(80 downto 74) <= pwm_match(2)(10 downto 4); --7 MSb of PWM2
- dat_reg(73 downto 68) <= pwm_match(3)(10 downto 5); --6 MSb of PWM3
- dat_reg(67 downto 32) <= adc_channels(35 downto 0); --current mesurments
+ dat_reg(86 downto 81) <= (others=>'0');--pwm_match(1)(10 downto 5); --6 MSb of PWM1
+ dat_reg(80 downto 74) <= (others=>'0');--pwm_match(2)(10 downto 4); --7 MSb of PWM2
+ dat_reg(73 downto 68) <= (others=>'0');--pwm_match(3)(10 downto 5); --6 MSb of PWM3
+ dat_reg(71 downto 60)<=(others=>'0');
+ dat_reg(59 downto 48) <= adc_channels(35 downto 24); --current mesurments
+ dat_reg(47 downto 36)<=(others=>'0');
+ dat_reg(35 downto 24) <= adc_channels(23 downto 12); --current mesurments
+ dat_reg(23 downto 12)<=(others=>'0');
+ dat_reg(11 downto 0) <= adc_channels(11 downto 0); --current mesurments