This N°9 Posted September 8, 2008 Report Share 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 Quote Link to comment Share on other sites More sharing options...
TK. Posted September 9, 2008 Report Share 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. Quote Link to comment Share on other sites More sharing options...
This N°9 Posted September 10, 2008 Author Report Share Posted September 10, 2008 ok, I see, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.