Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Re: RTC manipulation (ctd.)

2004-10-05 by Robert Adsett

At 09:24 PM 10/5/04 +0000, you wrote:
>After looking further looking up the usermanual and playing with the
>RTC registers....
>
> > PREINT = (PCLK/32768) - 1;                //integer value
> > PREFRAC = PCLK - ((PREINT + 1)* 32768);   //fraction value
>        // where PCLK = 14745600 or 14.7456MHz
>
>...this code from my previous post follows the Usr Manual but
>apparently the RTC ended up counting twice the speed of a normal
>clock (or stopwatch). I'm not sure why.
>
>PREINT  = ((2*PCLK)/32768) - 1;                //integer value
>PREFRAC =  (2*PCLK) - ((PREINT + 1)* 32768);   //fraction value
>        // where PCLK = 14745600 or 14.7456MHz

VPBDIV is 1?
And PLL is not enabled?

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

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.