English
Language : 

FMS7401L_05 Datasheet, PDF (25/81 Pages) Fairchild Semiconductor – Digital Power Controller
PRODUCT SPECIFICATION
FMS7401L
5 Programmable Comparator Circuit
The Programmable Comparator circuit is an analog comparator whose outputs may be monitored by software or fed into a dig-
ital delay filter used to disable the PWM Timer 1 circuit or its PWM cycle. The comparator’s non-inverting input is software
selectable by the COMPSEL bit of the ADCNTRL2 register.1 If COMPSEL=0, the non-inverting input of the Programmable
Comparator is the G4/AIN0 device pin. If COMPSEL=1, the non-inverting input of the Programmable Comparator is the G2/
AIN2 device pin. Before enabling the Programmable Comparator circuit, the selected analog input port pin must be configured
as a tri-state input bypassing the I/O circuitry.2 The inverting input of the comparator is controlled by the Voltage Loop
(VLOOP) enable bit of the comparator control (COMP) register. If VLOOP=0, the voltage loop is disabled and the inverting
input of the analog comparator is configured as one of the 63 programmable voltage levels (VTHL, VTHU). If VLOOP=1, the
analog comparator is set in a voltage loop configuration with the Uncommitted (Error) Amplifier output (AOUT) connected to
the comparator’s inverting input (see Figure 9).
The Programmable Comparator circuit may be configured and controlled by software through the two 8-bit Comparator
Control (COMP) and Digital Delay (DDELAY) registers. Both the Programmable Comparator and the digital delay filter
must be enabled by software by setting the Comparator Enable (COMPEN) and clearing the EPWM bits of the Digital Delay
(DDELAY) register. Upon a system reset, the Programmable Comparator is disabled and the digital delay filter is enabled.
The COMP circuit is automatically disabled during Halt Mode. After exiting the Halt Mode, software must wait at least 10
instruction clock cycles before reading the COUT bit to ensure that the internal circuit has stabilized.
Table 8. Programmable Comparator (COMP) Control Register Bit Definitions
COMP Register (addr. 0xA0)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
CL[5:0]
Bit 1
VLOOP
Bit 0
COUT
Bit
CL[5:0]
VLOOP
COUT
Description
Programmable Comparator Voltage Reference Level bits. Refer to Table 9 and Table 10 for details.
(0) Configures the inverting input of the analog comparator as one of the 63 programmable voltage levels (VTHL, VTHU).
(1) Configures the analog comparator in a voltage loop configuration with the Uncommitted Amplifier output (AOUT)
connected to the inverting input.
(0) G2/AIN2 or G4/AIN0 non-inverting input is less than inverting input configured by VLOOP.
(1) G2/AIN2 or G4/AIN0 non-inverting input is greater than inverting input configured by VLOOP.
5.1 Programmable Comparator’s Voltage Threshold Levels (VLOOP=0)
The Programmable Comparator circuit is configured to compare the G4/AIN0 or G2/AIN2 non-inverting input against the pro-
grammable voltage threshold levels on its inverting input (see Table 9 and Table 10). The comparator output (COUT) is 1 when
the G4/AIN0 or G2/AIN2 input pin rises above the selected voltage threshold. As long as the input stays above the selected
voltage threshold, the COUT signal will hold its state. The COUT signal will equal zero if the G4/AIN0 or G2/AIN2 input voltage
falls below the programmed threshold voltage or if the Programmable Comparator circuit is disabled. Software may change the
programmed threshold voltage on-the-fly as needed in the application. If the digital delay filter circuit is enabled (EPWM=0),
the COUT signal is monitored for its rising edge to generate the PWMOFF signal. Refer to Figure 8 and the following Digital
Delay Filter with PWMOFF Output section for addition details.
Bit 6 of the ADCNTRL2 register is the Programmable Comparator non-inverting input selection (COMPSEL) bit.1 If
COMPSEL=0, the non-inverting input of the Programmable Comparator is the G4/AIN0 device pin. If COMPSEL=1, the non-
inverting input of the Programmable Comparator is the G2/AIN2 device pin. Before enabling the Programmable Comparator
circuit, the selected analog input port pin must be configured as a tri-state input bypassing the I/O circuitry.2
REV. 1.0.3 1/24/05
25