AN1740 Freescale Semiconductor / Motorola, AN1740 Datasheet - Page 44

no-image

AN1740

Manufacturer Part Number
AN1740
Description
Applications Using the Analog Subsystem on MC68HC05JJ/JP Series Microcontrollers
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
Analog Interrupt
44
used to drive the input capture. Therefore, take care to follow these
rules:
The 16-bit timer continues to run while in wait mode, and this allows the
mode 2 or mode 3 A/D conversions to take place during wait mode.
When the conversion is complete, a timer interrupt will occur and the
MCU will exit wait mode.
A separate analog interrupt is provided with a vector location at $1FF2
and $1FF3. This interrupt is triggered by either the CPF1 or CPF2 flags
being set. These bits latch so that the triggering comparator can be
determined by polling the CPF1 or CPF2 bits in the analog interrupt
service routine. Since these latch bits are the triggering mechanism, they
should both be cleared before exiting the analog interrupt service
routine.
1. Always clear the TOF and OCF before clearing the ICF.
2. Avoid clearing the CPF2 comparator static flag too quickly after
3. Avoid changing the state of the INV bit after clearing the ICF as
4. Changes to the ICEN, ICIE, or IEDG bits can cause the ICF flag
5. Account for the first TOF, OCF, and ICF flags which can get set
Freescale Semiconductor, Inc.
For More Information On This Product,
Otherwise, clearing the ICF immediately will enable any existing
TOF or OCF to restart the charging cycle without regard for their
proper timing points.
clearing the ICF as this enables the timer to capture a new time
should the comparator output then rise again later.
this will cause a switching pulse to set the CPF2 bit and trigger an
unwanted ICF.
bit to become set. Always clear the ICF flag following any change
in the state of the ICEN, ICIE, and IEDG bits.
without any enabling control. They can get set before the software
is ready to use them.
Go to: www.freescale.com
MOTOROLA
AN1740

Related parts for AN1740