0
\$\begingroup\$

So i understand that a prescaler divides a clock, and PR2 is the period register which when the timer TMR2 reaches the value it increments from 0.

Why is a post scaler needed to divide a non-clock signal.

From the diagram it looks like the post scaler is trying to divide the comparator signal for when the first timer TMR2 reaches PR2 value.

I dont understand, couldnt another timer be used to identify when TMR2 reaches N iterations of reset?

Essentially i dont know what a post scaler performs and why it is used to divide a non-clock signal

enter image description here

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

This is just an added feature to the timer that allows it to further divide the comparator output by a value from 1 - 16.

Some MCUs have this feature and others don't. It's not strictly necessary but clearly the designers of this one thought it was useful enough that they included it.

Obviously if you set it to "1" it will have no effect.

\$\endgroup\$
5
  • \$\begingroup\$ SO is there actually any difference between a prescaler and postscaler except for their positions i guess? \$\endgroup\$
    – Yogi Bear
    Jan 8, 2021 at 13:56
  • 1
    \$\begingroup\$ Well they are both dividers. The prescaler controls how fast the timer clocks. The post-scaler divides the timer output by some value. Overall it just gives you more flexibility in controlling the counters. Personally I have never found a need for the post-scaler in any MCU I have used that had one. But, as is so often the case, there may be multiple ways to get the same result. \$\endgroup\$
    – jwh20
    Jan 8, 2021 at 14:05
  • \$\begingroup\$ Think of it as a way to reduce the number of interrupt calls \$\endgroup\$
    – Pete W
    Jan 8, 2021 at 14:47
  • \$\begingroup\$ Dude please dont say anything like that because it doesnt help \$\endgroup\$
    – Yogi Bear
    Jan 8, 2021 at 15:47
  • \$\begingroup\$ I just a video and i understand what ti does not \$\endgroup\$
    – Yogi Bear
    Jan 8, 2021 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.