Forums

Newbee needs timing examples

Started by teddyroskvist January 15, 2006
Hello World.

I have just startet with the arm lpc2119, and now i need some examples
on how i control time on the arm.

I would like to see use of the realtime clock, and the internal timers.

The only function the examples need to have i that it sets an io pin
high when the time occures.

I also need to know how i can make a delay of x ns/ms, or how to
calculate the number of loops to required give a certain delay.

I will be happy with any hints, or ideas.

Regards
Teddy



An Engineer's Guide to the LPC2100 Series

At 03:57 PM 1/15/06 +0000, teddyroskvist wrote:
>I would like to see use of the realtime clock, and the internal timers.
>
>The only function the examples need to have i that it sets an io pin
>high when the time occures.
>
>I also need to know how i can make a delay of x ns/ms, or how to
>calculate the number of loops to required give a certain delay.

See http://www.aeolusdevelopment.com/Articles/download.html Look at the
newlib-lpc source for an example of using the timer for generating
micro-second delays. There is also an application note
http://www.aeolusdevelopment.com/AppNotes/LPC210X/an-timerperformance.pdf
that describes the performance of the timer and one
http://www.aeolusdevelopment.com/AppNotes/LPC210X/ConfiguringTimer.html
describing how to adapt it for different clock rates.

The code was developed for the 2104/5/6 members of the family but should
work for other members since most (all?) share the same timer peripherals.

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
http://www.aeolusdevelopment.com/