LPC2148 - How to calculate Prescale Register value to get 1 millisecond delay using Timer ? The Peripheral clock is running at 12Mhz frequency.
Can anyone state the formula for this ?
Awaiting for valuable suggestions...
The user manual did a very good job stating the formula. Did you have any issues when using that formula?
The manual says: the Timer Counter is incremented and the Prescale Counter is reset on the next PCLK. This causes the TC to increment on every PCLK when PR = 0, every 2 PCLKs when PR = 1, etc.
This means that the clock will be divided by PR+1. Now it should be easy for you to calculate the value.
Alex