LPC2129 Timer

Everything ARM and LPC

Moderator: phalanx

Post Reply
abhavi
Posts: 1
Joined: Mon Mar 31, 2014 6:56 am

LPC2129 Timer

Post by abhavi » Mon Mar 31, 2014 6:59 am

Hi
I am using LPC 2129 board with ARM7TDMI core.
I have read the data sheet of the processor.But I am not getting clear
idea of various registers of Timer0 and Timer1.Particularly Relation
ship between TC(Timer counter) and PR(Prescale register) and PC
(Prescale counter).

Can anybody in the group explain me in detail the relationship among
three registers and its usage as match timer.

I will download the timer examples from the other sites.

Regards
Anand

stevech
Support Volunteer
Posts: 2907
Joined: Sat Jun 05, 2004 8:51 pm
Location: USA, California

Re: LPC2129 Timer

Post by stevech » Mon Mar 31, 2014 3:41 pm

I've used the timers, but it was some time ago. I have some code, but there is so much LPC2xxx code on the 'net and from NXP, I didn't have problems getting mine going.

The prescaler creates a clock for the timer, if the prescaler is enabled. The divisor is written to the prescaler, as a power of 2, such as divide by 1024. The prescaler's output frequency per the divisor, can be the input to the timer. Most microprocessors have this arrangement. The prescaler allows the timer to count more clock cycles before reaching the maximum count, e.g., rolling-over (the modulus of the counter). For a 32 bit counter as are common on ARM chips, the roll-over is 2 to the 32nd power clocks, using a start from 0.

It gets more involved.

cfb
Posts: 214
Joined: Sat Aug 30, 2008 11:50 pm
Contact:

Re: LPC2129 Timer

Post by cfb » Wed Apr 02, 2014 5:55 am

abhavi wrote:Hi
I am using LPC 2129 board with ARM7TDMI core.
I have read the data sheet of the processor.
The Data Sheets are mainly about the physical and electrical aspects of the NXP microcontrollers. You need the User Manual for all of the programming information.

You can download the User Manual (UM10114) for the LPC2129 from:

http://www.nxp.com/documents/user_manual/UM10114.pdf

You will find a whole chapter of about a dozen pages describing the operation of the Timers in great detail.
Chris Burrows
Astrobe: ARM Cortex-M3, Cortex-M4 and Xilinx FPGA Development System
http://www.astrobe.com

Post Reply