I have a project in mind and wanted to know if it can be done with an arduino.
I have a digital logic signal to be analyzed. It can either be active-high or active low. It is essentially a pulse, and I want to count how many pulses happen during a very specific period of time - which is 0.9375 seconds (so just under 1 second). The pulse frequency will range from 30 to 350 hz. I can make the pulse to be a specific duration, likely this will be 1.5 milli-seconds.
So I expect there will be anywhere from 30 to 350 counts during the time interval 0.9375 seconds. The arduino would presumably be able to check the state of an I/O pin where the pulse is coming in and detect the transition from low to high and increment a 16-bit binary variable holding the count value.
Once the .9375 second time interval has happened, counting stops and the binary count value is multiplied by 16 (left-shift 4 bits).
The resulting value is anticipated to be in the range of 450 to 5000 (an integer value). I want this value to be displayed by a 4-digit LED display.
The count value will then be reset to zero and the entire process will begin again.
The key here I guess is - can the arduino measure the counting interval of 0.9375 seconds accurately? Or, based on it's internal timers, is some other time interval more accurate? 1.0 seconds perhaps? The time interval of 0.9375 is chosen so that the binary multiplication by 16 can be accomplished with a 4-bit left shift, which should be very fast to perform.
And does it have the temporal resolution to check the state of an input pin that might be in an active state for as little as 1.5 ms ?



