This N°9 Posted September 8, 2008 Report Posted September 8, 2008 hi all,based on which criterias should I choose a timer prescaler? is there some performance advantage/disadvantage?in the documetation, this example is shown:// we want to setup the timer with a frequency of 500 Hz = 2 mS // prescaler 1:1 should be used // calculate the required number of clocks for this period: // clocks = period / 100 nS = 2 mS / 100 nS = 20000 // therefore: MIOS_TIMER_Init(0x00, 20000); // now the Timer() function is called every 2 mS!why not take a prescaler of 1:2 and set the period to 10000?this
TK. Posted September 9, 2008 Report Posted September 9, 2008 I'm using 1:1 prescaler in this example, so that the period time is easier to calculate.1 mS == 10000Maximum value for 1:1 prescaler is 65535 = 6.5535 mSgot the point?At application level, there are no real advantages/disadvantages when using higher prescaler values. Just select a prescaler which fits your needsBest Regards, Thorsten.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now