2015-06-07 10:46 AM
hi everyone i m going to interface encoder with motor the encoder is working perfectly and counting up to 0xFFFF in clock wise direction but when i rotate in counter clockwise direction it,s counting from 0 but from counter the value is start from 4294966870
i know that in hex 0-1=FFFF how to change it to -1 Encoder_Reading = TIM_GetCounter(TIM5);Thanks in advance2015-06-07 12:47 PM
hi everyone i m going to interface encoder with motor the encoder is working perfectly and counting up to 0xFFFF in clock wise direction but when i rotate in counter clockwise direction it,s counting from 0 but from counter the value is start from 4294966870
This might have been better in a new thread, as I doubt you are using an F103 part, and that TIM5 on your part is a 32-bit timer. You could restrict it to a 16-bit count if you suitably programmed the timebase.2015-06-09 09:48 AM