Datasheet
MC9S08QG8 and MC9S08QG4 Data Sheet, Rev. 5
Freescale Semiconductor 107
Chapter 8 
Analog Comparator (S08ACMPV2)
8.1 Introduction
The analog comparator module (ACMP) provides a circuit for comparing two analog input voltages or for 
comparing one analog input voltage to an internal reference voltage. The comparator circuit is designed to 
operate across the full range of the supply voltage (rail-to-rail operation). 
Figure 8-1 shows the MC9S08QG8/4 block diagram with the ACMP highlighted.
8.1.1 ACMP Configuration Information
When using the bandgap reference voltage for input to ACMP+, the user must enable the bandgap buffer 
by setting BGBE =1 in SPMSC1; see Section 5.8.8, “System Power Management Status and Control 1 
Register (SPMSC1)”. For the value of the bandgap voltage reference see Section A.5, “DC 
Characteristics”.
To use ACMPO, the BKGDPE bit in SOPT1 must be cleared. This will disable the background debug 
mode and on-chip ICE.
8.1.2 ACMP/TPM Configuration Information
The ACMP module can be configured to connect the output of the analog comparator to TPM input capture 
channel 0 by setting ACIC in SOPT2. With ACIC set, the TPMCH0 pin is not available externally 
regardless of the configuration of the TPM module.










