English
Language : 

MC9S12KG128 Datasheet, PDF (244/600 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 7 Analog-to-Digital Converter (ATD10B16CV1)
7.4.2 Digital Sub-Block
This subsection explains some of the digital features in more detail. See register descriptions for all details.
7.4.2.1 External Trigger Input
The external trigger feature allows the user to synchronize ATD conversions to the external environment
events rather than relying on software to signal the ATD module when ATD conversions are to take place.
The external trigger signal (out of reset ATD channel 15, configurable in ATDCTL1) is programmable to
be edge or level sensitive with polarity control. Table 7-26 gives a brief description of the different
combinations of control bits and their affect on the external trigger function.
Table 7-26. External Trigger Control Bits
ETRIGLE
X
X
0
0
1
1
ETRIGP
X
X
0
1
0
1
ETRIGE
0
0
1
1
1
1
SCAN
0
1
X
X
X
X
Description
Ignores external trigger.
Performs one conversion sequence and stops.
Ignores external trigger.
Performs continuous conversion sequences.
Falling edge triggered.
Performs one conversion sequence per trigger.
Rising edge triggered.
Performs one conversion sequence per trigger.
Trigger active low.
Performs continuous conversions while trigger is active.
Trigger active high.
Performs continuous conversions while trigger is active.
During a conversion, if additional active edges are detected the overrun error flag ETORF is set.
In either level or edge triggered modes, the first conversion begins when the trigger is received. In both
cases, the maximum latency time is one Bus Clock cycle plus any skew or delay introduced by the trigger
circuitry.
Once ETRIGE is enabled, conversions cannot be started by a write to ATDCTL5, but rather must be
triggered externally.
If the level mode is active and the external trigger both de-asserts and re-asserts itself during a conversion
sequence, this does not constitute an overrun. Therefore, the flag is not set. If the trigger is left asserted in
level mode while a sequence is completing, another sequence will be triggered immediately.
7.4.2.2 General-Purpose Digital Input Port Operation
The input channel pins can be multiplexed between analog and digital data. As analog inputs, they are
multiplexed and sampled to supply signals to the A/D converter. As digital inputs, they supply external
input data that can be accessed through the digital port registers (PORTAD0 & PORTAD1) (input-only).
MC9S12KG128 Data Sheet, Rev. 1.15
244
Freescale Semiconductor