Jump to content

Distinguish between TimerPrescaleSet vs TimerLoadSet

Recommended Posts



Prescaler (in simple words) means that the clock driving your Timer is divided by 500 - your timer counts 500 times slower than the system clock speed.

Let's assume a system clock of 80Mhz: 80Mhz / 500 = 160kHz  --> 1/160kHz = 6,25µs for one counter step.


Your Timer is loaded with a start value of 60000 and counts down to 0.

So you have 60000 steps * 6,25µs = 0.375s - that is your timer period for one full count from 60000 downto 0.


Or as equation - easy to adapt for different values of Prescaler, TimerLoad and System Clock:

TimerPeriod = 60000 * 500 / 80MHz.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...