Tracking an optical encoder overflow and underflow
I'm using an STM32F407 MCU with a 600 PPR incremental optical encoder. The encoder is coupled to a stepper motor that drives a 5mm pitch ballscrew. I'm trying to keep track of the encoder count to determine the absolute position of the spindle attach...