Quote:
Originally Posted by tr6scott
See my cad pic,  Yellow indicating where the reflector tape is mounted.
90 degrees on, 90 degrees off, 90 degrees on, 90 degrees off, as it spins.
|
Yes, that's clear, thank you. Are you counting only rising edges, or both rising and falling?
Quote:
Originally Posted by tr6scott
We are using the same code that was posted
|
Are you referring to
the code Mark posted? What you are describing is not what he posted. The code he posted is equivalent to the getPeriod() method in the WPILib, which uses the 153KHz sampling and 1μs timer in the FPGA to measure the elapsed time between counts. If you use the code Mark posted, and if you are counting rising and falling edges, and if you have the FPGA sample averaging ring buffer set to 4 samples,
you should be getting rock-steady accurate rpm readings.