Using timer2 problem
hi,
i trying use timer2 on arduino uno having unexpected behaviour understand , fix. have attached library have created , have been using.
basically problem lies when trying set timer period using either enabletimerinterrupt(void (*isr)(), unsigned long microseconds=0) or enablepwm(uint8_t pin, uint8_t duty, unsigned long microseconds=0) functions.
setting microseconds 2000 or less, resulting period close enough target value.
however cannot seem higher that. example if try set microseconds 4000 or more, end period of 2ms or less!
any ideas on what's gone wrong here?
i trying use timer2 on arduino uno having unexpected behaviour understand , fix. have attached library have created , have been using.
basically problem lies when trying set timer period using either enabletimerinterrupt(void (*isr)(), unsigned long microseconds=0) or enablepwm(uint8_t pin, uint8_t duty, unsigned long microseconds=0) functions.
setting microseconds 2000 or less, resulting period close enough target value.
however cannot seem higher that. example if try set microseconds 4000 or more, end period of 2ms or less!

any ideas on what's gone wrong here?
Arduino Forum > Using Arduino > Programming Questions > Using timer2 problem
arduino
Comments
Post a Comment