herunterladen
© Motorola, Inc., 2004
AN2724
Rev. 0, 4/2004
Using the HCS12X PIT as a
24-bit Elapsed Timer
Application Note
By Stephen Pickering
8/16-bit Systems Group
East Kilbride, Scotland
Introduction
This application note demonstrates how the Programmable Interrupt Timer
(PIT) module on the HCS12X can be used as a 24-bit elapsed timer.
The HCS12X Programmable Interrupt Timer
The Programmable Interrupt Timer is an array of two 8-bit micro timers and four
16-bit timers that can be used to trigger peripheral modules or to raise periodic
interrupts. Notable features of the Programmable Interrupt Timer are as
follows.
• Four timers implemented as programmable modulus down-counters
with independent timeout periods
• Timeout periods selectable between 1 and 2
24
bus clock cycles. The
timeout equals m*n bus clock cycles, where 1
<= m <= 256 and
1
<= n <= 65536
• The timers can be enabled individually
• Starting of timer channels can be aligned to each other
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc
.
..
Semiconductor, Inc., 2004. All rights reserved.