Q: Setting 50ms timer

Post Reply
chukmunnlee
Posts: 7
Joined: Wed Aug 13, 2008 2:56 am

Q: Setting 50ms timer

Post by chukmunnlee » Thu Oct 23, 2008 3:33 am

Hi all, I've use the following code to set a 50ms timer. Does the following code correctly sets it?

TIMER3_CR = 0;
TIMER3_DATA = TIMER_FREQ_64(20);
TIMER3_CR = TIMER_ENABLE | TIMER_DIV_64 | TIMER_IRQ_REQ;
irqSet(IRQ_TIMER3, timer_50ms);
irqEnable(IRQ_TIMER3);

More specifically, am I using the correct divisor?

Thanks

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest