3 ms·
Or just continuously poll input pins and compare with scratch register. When anything changes, execute check logic. Probably best one is just waiting on pin cha
by yetihehe 6y ago
Or 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.