DI input counter problem
Posted: 27 Dec 2022, 15:26
Hello Guys
I am trying to use DI to read pulse data from the sensor with frequency varying from 2Hz to 2Khz after configuring DI to counter mode.
I tested the module, and when checking the counter value it is always 0 until I disconnect the sensor it increments by 1.
I tried both falling and rising edge configurations and encounter the same problem.
I repeat the test with the MIO module with "PulseIn" mode and the counter works perfectly.
my question is what is the difference between the MIO pulse in mode and the input counter mode of the DI, and why the DI is not counting?
I am trying to use DI to read pulse data from the sensor with frequency varying from 2Hz to 2Khz after configuring DI to counter mode.
I tested the module, and when checking the counter value it is always 0 until I disconnect the sensor it increments by 1.
I tried both falling and rising edge configurations and encounter the same problem.
I repeat the test with the MIO module with "PulseIn" mode and the counter works perfectly.
my question is what is the difference between the MIO pulse in mode and the input counter mode of the DI, and why the DI is not counting?