Instead of listing the Clock divider as CLOCK/2, 8, 32, 128, 1024 how about listing instead the appropriate timerange for the pulses?
CLOCK/128 doesn't mean anything to me since I don't know the logic behind it. How about instead listing the dropdowns as say 1-100Hz, 100-1000Hz or 1-1000us, 1-100ms, etc. Or at least give us a cheat sheet so we can know what frequency range/pulse time period is appropriate for each of these settings.
Feature suggestion for "Clock divider"
Good to hear this could be a future improvement.
In the meantime, which clock divider would be appropriate for a rpm signal pulsewidth of 50ms to 3.75ms? This corresponds to 600-8000rpm on my car, which is of course outside the working range of the engine.....
Just wondering if perhaps I am using the wrong clock divider because I should definitely be able to acquire the blue signal below but as I reported in my previous post it doesn't work, constant 997.
In the meantime, which clock divider would be appropriate for a rpm signal pulsewidth of 50ms to 3.75ms? This corresponds to 600-8000rpm on my car, which is of course outside the working range of the engine.....
Just wondering if perhaps I am using the wrong clock divider because I should definitely be able to acquire the blue signal below but as I reported in my previous post it doesn't work, constant 997.
I'm thinking that (divider/48000000) will tell you the minimum amount of time between pulses that can be measured.
As for maximum, it should be able to measure anything slower? I would think you'd want to set the clock divider as high as you reasonably can, based on what you're measuring, so as to not hog system resources.
So perhaps he's using a timer or other finite sized variable that overflows and can't measure your pulse speed. What prescaler are you using? Did you try a larger one? If he's using a 16-bit timer, then the slowst pulse speed that could be measured with a prescaler of 1 is:
(1/48000000)*65535 = 0.00273 = 2.73 ms.
As for maximum, it should be able to measure anything slower? I would think you'd want to set the clock divider as high as you reasonably can, based on what you're measuring, so as to not hog system resources.
So perhaps he's using a timer or other finite sized variable that overflows and can't measure your pulse speed. What prescaler are you using? Did you try a larger one? If he's using a 16-bit timer, then the slowst pulse speed that could be measured with a prescaler of 1 is:
(1/48000000)*65535 = 0.00273 = 2.73 ms.
I think you might be onto something. Under my thread for erratic rpm in the hardware section I had posted this comparison of measuring rpm with different clock divider settings, where the number after RPM is the clock divider setting.
When the blue signal above is used, Clock/128 is clearly the best choice for the maximum pulsewidth of 30ms at idle of 1000. (pulse per rev divider was incorrectly set to 2/rev, so calculated rpm is double what it actually was.)
When the blue signal above is used, Clock/128 is clearly the best choice for the maximum pulsewidth of 30ms at idle of 1000. (pulse per rev divider was incorrectly set to 2/rev, so calculated rpm is double what it actually was.)
Last edited by GTIspirit on Mon May 13, 2013 4:43 pm, edited 1 time in total.