Rotary Encoder Interface Circuit