English
Language : 

MC9RS08KA2 Datasheet, PDF (85/132 Pages) Freescale Semiconductor, Inc – Microcontrollers
Analog Comparator (RS08ACMPV1)
Table 10-2. ACMPSC Field Descriptions
Field
7
ACME
6
ACBGS
5
ACF
4
ACIE
3
ACO
Description
Analog Comparator Module Enable — ACME enables the ACMP module.
0 ACMP not enabled.
1 ACMP is enabled.
Analog Comparator Bandgap Select — ACBGS is used to select between the internal bandgap reference
voltage or the ACMP+ pin as the non-inverting input of the analog comparator.
0 External pin ACMP+ selected as non-inverting input to comparator.
1 Internal bandgap reference voltage selected as non-inverting input to comparator.
Analog Comparator Flag — ACF is set when a compare event occurs. Compare events are defined by ACMOD.
ACF is cleared by writing a one to ACF.
0 Compare event has not occurred.
1 Compare event has occurred.
Analog Comparator Interrupt Enable — ACIE enables the interrupt for the ACMP. When ACIE is set, an
interrupt will be asserted when ACF is set.
0 Interrupt disabled.
1 Interrupt enabled.
Analog Comparator Output — Reading ACO will return the current value of the analog comparator output. ACO
is reset to a 0 and will read as a 0 when the ACMP is disabled (ACME = 0).
2
ACOPE
1:0
ACMOD
Analog Comparator Output Pin Enable — ACOPE is used to enable the comparator output to be placed onto
the external pin, ACMPO. ACOPE will only control the pin if the ACMP is active (ACME=1).
0 Analog comparator output not available on ACMPO.
1 Analog comparator output is driven out on ACMPO.
Analog Comparator Mode — ACMOD selects the type of compare event which sets ACF.
00 Encoding 0 — Comparator output falling edge.
01 Encoding 1 — Comparator output rising edge.
10 Encoding 2 — Comparator output falling edge.
11 Encoding 3 — Comparator output rising or falling edge.
10.4 Functional Description
The analog comparator can be used to compare two analog input voltages applied to ACMP+ and ACMP–;
or it can be used to compare an analog input voltage applied to ACMP– with an internal bandgap reference
voltage. ACBGS is used to select between the bandgap reference voltage or the ACMP+ pin as the input
to the non-inverting input of the analog comparator.
The comparator output is high when the non-inverting input is greater than the inverting input, and it is low
when the non-inverting input is less than the inverting input. ACMOD is used to select the condition which
will cause ACF to be set. ACF can be set on a rising edge of the comparator output, a falling edge of the
comparator output, or either a rising or a falling edge (toggle). The comparator output can be read directly
through ACO. The comparator output can also be driven onto the ACMPO pin using ACOPE.
MC9RS08KA2 Series Data Sheet, Rev. 2
Freescale Semiconductor
85