EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

I want to calculate prescaler register value

Started by ravimali_goa28 June 17, 2012
I am using LPC 2148 i am completely new to this. My problem is that how should i calculate the Prescaler Register value for 48mS delay using timer. I am running LPC2148 @ 12MHz. I want the equation for Prescaler calculation

Thanking in Anticipation.
Ravi.

An Engineer's Guide to the LPC2100 Series

On 17/06/2012 13:42, ravimali_goa28 wrote:
> I am using LPC 2148 i am completely new to this. My problem is that how
> should i calculate the Prescaler Register value for 48mS delay using
> timer. I am running LPC2148 @ 12MHz. I want the equation for Prescaler
> calculation

Try ARMwizard:

http://alexan.edaboard.eu/

Leon
--
Leon Heller
G1HSM
On 17/6/2012 15:42, ravimali_goa28 wrote:
>
> I am using LPC 2148 i am completely new to this. My problem is that how should i calculate the Prescaler Register value for 48mS
> delay using timer. I am running LPC2148 @ 12MHz. I want the equation for Prescaler calculation
>
> Thanking in Anticipation.
> Ravi.

Is 12MHz your peripheral clock?

The timer frequency is PCLK/(PR+1)

Basically calculate the frequency of 48ms (1 / 0.048sec = 20.8333Hz)
12MHz / 20.8333Hz = 576000
So PRW6000-1

Actually the user manual is the best resource to answer such questions

Alex

---------------------
http://alexan.edaboard.eu/ (Home of ARMwizard, a free tool for peripheral initialization of LPC2xxx/17xx/13xx/11xx microcontrollers )




The 2024 Embedded Online Conference