I have a question which may not be possible or purely a figment of my imagination.
Basically I have a 60 Khz square wave, and I want to read the frequency with the PulseIn function on an Arduino digital pin. The readings I get are not that accurate.
Is there a way to scale down the frequency (divide) using prescalers or timers. I've seen some vague articles maybe saying this is possible although I don't fully understand the concept. At 1Khz the readings become more accurate.
Vieri22:
I have a question which may not be possible or purely a figment of my imagination.
Basically I have a 60 Khz square wave, and I want to read the frequency with the PulseIn function on an Arduino digital pin. The readings I get are not that accurate.
Is there a way to scale down the frequency (divide) using prescalers or timers. I've seen some vague articles maybe saying this is possible although I don't fully understand the concept. At 1Khz the readings become more accurate.
Any help would be greatly appreciated
You could use an timer input capture. What Arduino are you using?
Generally you loose resolution when you divide, unless you add decimal places.
Is there a way to scale down the frequency (divide) using prescalers or timers.
My "intuition" tells me that software solutions won't help unless you need to "smooth" or average the readings. A hardware frequency divider in front of the Arduino might help, depending on the cause of the inaccuracy. But again, you're actually loosing resolution.