How to configure timers in P89LPC932

Started by tanuja, February 23, 2006, 09:54:06 PM

Previous topic - Next topic

tanuja

Hi everyone,

How to configure the timer0 or timer1 in 16 bit timer mode using 12Mhz crystal oscillator for P89LPC932.
If i want to generate delay of 1sec, how it can be done using timer in 16 bit timer mode.
I tried with code generator, but cannot understand it, as i cannot select the timer mode there.
Please guide me.

Thanks

erikm

erik

Andy Ayre

Yes. But a note on Code Architect: it picks the most appropriate mode depending on your inputs. Using the on-chip oscillator, 1 sec is not possible. Instead you will have to time a shorter period and use a counter.

Embedded Systems Academy, Inc.
support at esacademy dot com

markbng

You can set a shorter time out for a timer in mode2 and count the time-outs/overflows. You can poll the TF0/TF1 bit. Clear the bit and increase the time-out counter. Break the loop if 1sec delay is reached (Time-out time * CounterValue = 1 sec.). See data-sheet for more information about the timers.

Regards,
Mark



Post Edited (02-24-06 07:56)