Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] Lpc2129 timers problem

Status
Not open for further replies.

v.s.n.kumar

Member level 1
Member level 1
Joined
Dec 2, 2013
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Visit site
Activity points
303
Hi,
I have a problem with timers in keil debugging. i.e., i wrote the programm for 1 second and peripheral clock is 12 mhz. the timer runs only for 1second and immediately it stops. and the programm is
#include<LPC21xx.h>
void main()
{
T0TC=0X0;
T0TCR=1<<1;
T0PR=11999999;
T0TCR=(1<<0);
while(!(T0TC==1));
T0TCR=(0<<0);
while(1);
}
i have calculated the prescalar register value for 1 second. while debugging this program in keil, the timer0 is off at 4seconds. but i have calculated for 1second. what is the problem in this code. please can anybody tell me
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top