Keil Logo

RTX51 TINY: PURPOSE OF INT_CLOCK


Information in this article applies to:

  • C51 Version 5.50
  • RTX51 Tiny Version 1.06

QUESTION

What is the purpose of the configuration parameter INT_CLOCK in RTX51 Tiny, and how does it relate to the execution speed of my multitasking firmware?

ANSWER

A timer is used to periodically generate interrupts, which provides the RTX51 Clock. In order to generate an interrupt, the timer must count up to 65535 (FFFFH) and then overflow to 0. After each interrupt the timer is reloaded with a value to start counting up from. This value is 65535 - INT_CLOCK. INT_CLOCK is, therefore, the number of machine cycles between interrupts.

For example, if INT_CLOCK is 10000, then the timer must count up 10000 machine cycles between interrupts. For a crystal frequency of 12MHz, each machine cycle takes 1 MicroSecond. Therefore, interrupts will occur every 10 MilliSeconds.

By lowering the value of INT_CLOCK, the speed of the RTX51 Clock may be increased. Each interrupt has some overhead (100-200 machine cycles) and setting the value too low results in all the processing time used for interrupt overhead rather than task execution.

MORE INFORMATION

Last Reviewed: Friday, July 15, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.