]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Fri, 7 Aug 2009 12:41:04 +0000 (12:41 +0000)
committerhadeshyp <hadeshyp>
Fri, 7 Aug 2009 12:41:04 +0000 (12:41 +0000)
trb_net_onewire.vhd

index 2f5945786cfc54e3e59d7eb8334859f04f70c343..59d611fe20ae010c63fb01e755bbaeee1f5069ee 100644 (file)
@@ -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;