- 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
+ dat_reg(80 downto 72) <=adc_m_count(8 downto 0); --count of measurments
+ --data order schould be: ch2 downto ch0 downto ch1
+ dat_reg(71 downto 0) <= adc_channels(71 downto 0); --current mesurments