Quote:
Originally Posted by Ether
...because you can't tell which edge came first, so you don't know the direction.
|
Correct. Also for noise rejection. If you get a bounce or even a little electrical noise around a transition, you may count that edge more than once (you could use digital filtering, but that drops the max rate even further).
Quote:
Originally Posted by Ether
I suppose it could just assume the direction hasn't changed, and go ahead and use the data. But I can imagine scenarios where that might be fraught with peril.
|
That would break noise rejection and could also be an invalid assumption. The point is the decoder simply doesn't know.
Quote:
Originally Posted by Ether
Unless you setup the FPGA to do averaging over a large enough sample size?
|
Perhaps, depending on your requirements. Generally it is the wrong approach for very fast encoder signals.
Quote:
Originally Posted by Ether
Are there code examples how to do this in all 3 supported languages?
|
Not that I'm aware of. I don't even know that DMA was implemented at the API level in WPILib for C++ and Java.