I have set up TIM with a overflow interrupt. The prescaler is set to precision. I want to set the overflow to exactly 10 msec. The prescaler does not give me a way to set to this time. It also seems that I cannot write to TCNT in the interrupt to control the next overflow time. How can I get the 10 msec I require.
Ray.
Solved! Go to Solution.
Hi Ray,
attached is processor expert demo code for 10ms overflow interrupt.
in the sample, system clock is 6.25M
interrupt frequency is 6.25M/65536=95.367Hz that is around 10ms
can this help you?
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Ray,
attached is processor expert demo code for 10ms overflow interrupt.
in the sample, system clock is 6.25M
interrupt frequency is 6.25M/65536=95.367Hz that is around 10ms
can this help you?
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Zhang Jun
Thank you.
Ray.
Hi Ray,
you are welcome!
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------