when START =>
if READOUT_ENABLE_IN = '1' then
next_state <= IDLE;
+ reset_timecounter <= '1';
end if;
when IDLE =>
if is_time_reached(timecounter,640000,CLK_PERIOD) = '1' then
when READ_READ_ROM =>
inc_bitcounter <= '1';
if bitcounter_vector(6) = '1' then --read 64 bit
- next_state <= IDLE;
+ next_state <= START;
if USE_TEMPERATURE_READOUT = 1 then
next_send_rom <= '0';
next_conv_temp <= '1';
--reading sensor answers
when READ_CONV_TEMP => --waiting for end of conversion
--- if PARASITIC_MODE = c_NO then
--- if recv_bit = '1' then --polling device for end of measurement
--- next_state <= IDLE;
--- if USE_TEMPERATURE_READOUT = 1 then
--- next_conv_temp <= '0';
--- next_reading_temp <= '1';
--- end if;
--- else
--- next_state <= READ_BIT;
--- end if;
--- elsif PARASITIC_MODE = c_YES then --waiting 1.3s, then start reading
if PARASITIC_MODE = c_YES then
next_strong_pullup <= '1';
end if;
if is_time_reached(timecounter,130000000,CLK_PERIOD) = '1' then
- next_state <= IDLE;
+ next_state <= START;
if USE_TEMPERATURE_READOUT = 1 then
next_conv_temp <= '0';
next_reading_temp <= '1';
end if;
end if;
--- end if;
+
when READ_READ_TEMP =>
inc_bitcounter <= '1';
if bitcounter_vector(3 downto 2) = "11" then --read 12 bit
- next_state <= IDLE;
+ next_state <= START;
if USE_TEMPERATURE_READOUT = 1 then
next_send_rom <= '1';
next_reading_temp <= '0';
end if;
when others =>
- next_state <= IDLE;
+ next_state <= START;
end case;
end process;