3 ms·
I guess the ting to do would be to somehow wait on a change on either line. Could be done with a wait on just one line if I only want half counts instead of qu
by MatthiasWandel 6y ago
I guess the ting to do would be to somehow wait on a change on either line. Could be done with a wait on just one line if I only want half counts instead of quarter counts
- yetihehe 6y agoOr just continuously poll input pins and compare with scratch register. When anything changes, execute check logic. Probably best one is just waiting on pin changes and sending them to main processor for handling. I have multiple quadrature decoder in plans, but nothing started yet and this is approach I will be taking if no one makes anything better until then. When you check 16 pins for changes, you can easily handle 8 decoders with just one PIO state machine and some cunning decoding logic. I wouldn't be surprised, if someone implements quadrature decoding with hardware interpolator. It's one nice piece of hardware. You can do single cycle 2d texture mapping or rotozooming with that thing.