Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
© 2010 Microchip Technology Inc. Preliminary DS39741A-page 48-15
Section 48. Comparator with Blanking
Comparator with
Blanking
48
48.4 COMPARATOR CONFIGURATION
Each of the comparators in the Comparator with Blanking module is configured independently by
various control bits in the following registers:
• Comparator Status register (CMSTAT) (Register 48-1)
• Comparator Control register (CMxCON) (Register 48-2)
• Comparator Mask Source Control register (CMxMSKSRC) (Register 48-3)
• Comparator Mask Gating Control register (CMxMSKCON) (Register 48-4)
• Comparator Filter Control register (CMxFLTR) (Register 48-5)
• Comparator Voltage Reference Control register (CVRCON) (Register 48-6)
48.4.1 Comparator Enable/Disable
The comparator under control may be enabled or disabled using the corresponding CON bit
(CMxCON<15>). When the comparator is disabled (CON = 0), the corresponding trigger and
interrupt generation is also disabled.
It is recommended to first configure the CMxCON register with all bits to the desired value, and
then set the CON bit (CMxCON<15>).
48.4.2 Comparator Output Blanking Function
In many power control and motor control applications, there are periods of time in which the
inputs to the analog comparator are known to be invalid. The blanking (masking) function
enables the user to ignore the comparator output during predefined periods of time. In this
document, the terms ‘masking’ and ‘blanking’ are used interchangeably.
Figure 48-4 illustrates a block diagram of the comparator blanking circuitry. A blanking circuit is
associated with each analog comparator.
Each comparator’s blanking function has three user selectable inputs:
• MAI (Mask A Input)
• MBI (Mask B Input)
• MCI (Mask C Input)
The MAI, MBI and MCI signal sources are selected through the SELSRCA<3:0>,
SELSRCB<3:0> and SELSRCC<3:0> bit fields in the CMxMSKSRC registers.
The MAI, MBI and the MCI signals are fed into an AND-OR function block, which enables the
user to construct a blanking (masking) signal from these inputs.
The blanking (masking) function is disabled following a system Reset.
The HLMS bit (CMxMSKCON<15>) configure the masking logic to operate properly depending
on the default (deasserted) state of the comparators.
If the comparator is configured for ‘positive logic’ so that a ‘0’ represents a deasserted state and
the comparator output is a ‘1’ when it is asserted, the HLMS bit should bet set to ‘0’ so that the
blanking function (assuming the blanking function is active) will prevent the ‘1’ signal of the
comparator from propagating through the module.
If the comparator is configured for ‘negative logic’ so that a ‘1’ represents a deasserted state and
the comparator output is a ‘0’ when it is asserted, the HLMS bit should be set to a ‘1’ so that the
blanking function (assuming blanking function is active) will prevent the ‘0’ signal of the
comparator from propagating through the module.
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ32MC10X-Reference_Manual-Section48-Comparator_with_Blanking.pdf