From: hadeshyp Date: Fri, 7 Aug 2009 12:41:04 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: oldGBE~400 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=d06e2c74c037b81ae3b04a1d8b8d8daa4e6c70e5;p=trbnet.git *** empty log message *** --- diff --git a/trb_net_onewire.vhd b/trb_net_onewire.vhd index 2f59457..59d611f 100644 --- a/trb_net_onewire.vhd +++ b/trb_net_onewire.vhd @@ -96,6 +96,7 @@ begin 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 @@ -171,7 +172,7 @@ begin 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'; @@ -183,33 +184,22 @@ begin --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'; @@ -268,7 +258,7 @@ begin end if; when others => - next_state <= IDLE; + next_state <= START; end case; end process;