Keil Logo

GENERAL: MY TIMER DOESN'T WORK AS EXPECTED


Information in this article applies to:

  • C51 All Versions
  • µVision2 Version 2.20a

QUESTION

I'm new to 8051 and I'm having problems to work with timers. My Timer0 doesn't work as expected. What could be wrong?

ANSWER

There are several things that may cause problems with timers.

  1. Your Timer0 configuration may be wrong.
  2. Your Timer0 values ( TH0 and TL0 ) may be wrong.
  3. Your Target XTAL frequency may not be correct.
  4. You selected a reduced machine instruction cycle mode 8051 derivative.

RESOLUTION

Check all the mentioned possibilities, correct what might be wrong, and your timer will work as expected.

MORE INFORMATION

You may consult a 8051 datasheet to get more information about timer/counter.

SEE ALSO

Last Reviewed: Saturday, July 9, 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.