Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Configuring the Timer 0

2004-12-23 by Robert Adsett

At 09:12 PM 12/21/04 +0000, you wrote:
>If I set the P0PR (prescaler register) to 0xEA60 (decimal 60000), then
>when I start the Timer 0, will I have an increment on T0TC (Timer
>Counter) each 60000 cycles of clock? or what's more easy to
>understand... will T0TC increment in one each 1ms?
>My idea is to make a short rutine that start the timer, and stop it
>when 1mS has passed...

Remember a counter only has a 1 count accuracy at best.  If you want to 
time a single ms wait your count should be much faster (10x faster will 
give you 10% accuracy).  That's one reason the timer in the newlib-lpc 
support runs as fast as it does.

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.