Datasheet
Chapter 16 Analog Comparator (S08ACMPV2)
MC9S08LC60 Series Data Sheet: Technical Data, Rev. 4
298 Freescale Semiconductor
16.3.1 ACMP Status and Control Register (ACMPSC)
ACMPSC contains the status flag and control bits which are used to enable and configure the ACMP.
7 6 5 4 3 2 1 0
R
ACME ACBGS ACF ACIE
ACO
ACOPE ACMOD
W
Reset: 0 0 0 0 0 0 0 0
= Unimplemented
Figure 16-3. ACMP Status and Control Register
Table 16-2. ACMP Status and Control Register Field Descriptions
Field Description
7
ACME
Analog Comparator Module Enable — ACME enab
les the ACMP module.
0 ACMP not enabled
1 ACMP is enabled
6
ACBGS
Analog Comparator Bandgap Select — ACBGS is used to select betw
een the bandgap reference voltage or
the ACMP+ pin as the input to the non-inverting input of the analog comparatorr.
0 External pin ACMP+ selected as non-inverting input to comparator
1 Internal reference select as non-inverting input to comparator
5
ACF
Analog Comparator Flag — A
CF is set when a compare e
vent 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
4
ACIE
Analog Comparator Interrupt Enable — A
CIE enab
les the interrupt from the ACMP. When ACIE is set, an
interrupt will be asserted when ACF is set.
0 Interrupt disabled
1 Interrupt enabled
3
ACO
Analog Comparator Output — Reading A
CO will retur
n 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
Analog Comparator Output Pin Enable — ACOPE is used to enab
le the comparator output to be placed onto
the external pin, ACMPO.
0 Analog comparator output not available on ACMPO
1 Analog comparator output is driven out on ACMPO
1:0
ACMOD
Analog Comparator Mode — A
CMOD selects the type of compare e
vent 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
