Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Timer_interrupt

2004-12-01 by manikandan palaniappan

Hi,

I am using LPC 2104 with 14.7456Mhz crystal.i want a timer interrupt to be occured every 1 minute.The calculation and settings i follwed are below

I AM USING IAR EMBEDDED WORKBENCH 4.11A

PLLCON = ( PLLCON & ~MA_PLLCON_SCB_MASK ) | MA_PLLCON_SCB;

PLLCFG = ( PLLCFG & ~MA_PLLCFG_SCB_MASK ) | MA_PLLCFG_SCB;

PLLFEED = ( PLLFEED & ~MA_PLLFEED_SCB_MASK ) | MA_PLLFEED_SCB;

PEFINED VALUES

PLLCON= ?

MA_PLLCON_SCB_MASK=0x00000003 

MA_PLLCON_SCB=0x00000000

PLLCFG=?

MA_PLLCFG_SCB_MASK=0x0000007F

MA_PLLCFG_SCB=0x00000000

PLLFEED=?

MA_PLLFEED_SCB_MASK=0x000000FF

MA_PLLFEED_SCB=0x00000000

I DID'NT FIND ANY VALUES FOR PLLCON,PLLCFG,PLLFEED.WHEN CALCULATING WITH DEFAULT VALUE FOR PLLCON,PLLCFG,PLLFEED AT RESET,I THINK PLL IS DISABLED AND MY SYSTEM RUNS AT 14.7456Mhz only

TIME PERIOD T=1/F

T=1/14745600

T=67.8 nano seconds

for timer counting upto FFFF FFFF it takes 67.8e-9 * 0xFFFF FFFF,it gives me 287 seconds.whether method i followed to calculate the timer is correct or not.for one minute timer interrupt the calculation is

60/67.8e-9=0x34BF 5A68

when i set the above value for match register 0(MR0).interrupt wont occur at 1 minute,instead interrupt occurs at 4 minute.is my calculation and settings are right?

whether pll is disabled or not.please help me to set correct settings and calculation.

rgds,

mani


		
---------------------------------
Do you Yahoo!?
 The all-new My Yahoo! � Get yours free!    

[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.