forked from tanchou/Verilog
Adjust timer threshold for signal detection in DHT11 interface
This commit is contained in:
@@ -107,7 +107,7 @@ module dht11_interface #(
|
|||||||
|
|
||||||
timer <= timer + 1;
|
timer <= timer + 1;
|
||||||
|
|
||||||
if (sig_in == 0 && timer > 1) begin
|
if (sig_in == 0 && timer > 2) begin
|
||||||
|
|
||||||
state <= RESPONSE_LOW;
|
state <= RESPONSE_LOW;
|
||||||
timer <= 0;
|
timer <= 0;
|
||||||
@@ -119,7 +119,7 @@ module dht11_interface #(
|
|||||||
o_state <= state;
|
o_state <= state;
|
||||||
timer <= timer + 1;
|
timer <= timer + 1;
|
||||||
|
|
||||||
if (sig_in == 1) begin
|
if (sig_in == 1 && timer > 2) begin
|
||||||
|
|
||||||
timer <= 0;
|
timer <= 0;
|
||||||
state <= RESPONSE_HIGH;
|
state <= RESPONSE_HIGH;
|
||||||
|
Reference in New Issue
Block a user