@horace I have your code (post #18) running on a CYD. I have a square wave going into GPIO-22, 50% duty cycle, frequency is 36.08 hz. The CYD is displaying X freq Y where X ranges from 480 to 490 and Y ranges from 50 to 52. I calculate that this signal would be 540 - 550 RPM.
If I change the frequency to about 123 or 124, X ranges from 1600 to 1680, and y ranges from 170 to 179. This should read 1850 rpm.
It seems to print a new line every 10 seconds.