SLAAE76B march 2023 – june 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3106 , MSPM0G3107 , MSPM0G3505 , MSPM0G3506 , MSPM0G3507
The MSPM0G comparator module (COMP) is an analog voltage comparator with general comparator functionality.
The COMP module includes internal and external inputs that can be used to flexibly to process analog signals. An internal temperature sensor can be used as a direct input to the COMP.
The MSPM0G Comparator module also combine two COMP to implement a window comparator function. As shown in Figure 6-8, COMP0 and COMP1 can be configured together to create a window comparator. In this configuration, the input signal is connected to the positive terminal of the comparators connected together, and the upper and lower threshold voltages are connected to the negative terminal of the comparators.
The COMP module also includes a SHORT switch that can be used to build a simple sample-and-hold for the comparator.
As shown in Figure 6-9, the required sampling time is proportional to the size of the sampling capacitor (CS), the resistance of the input switches in series with the short switch (R), and the resistance of the external source (RS). The sampling capacitor CS should be greater than 100 pF. The time constant, Tau, to charge the sampling capacitor CS can be calculated with the below equation.
Depending on the required accuracy, use 3 to 10 Tau as the sampling time. With 3 Tau the sampling capacitor is charged to approximately 95% of the input signals voltage level, with 5 Tau it is charged to more than 99%, and with 10 Tau the sampled voltage is sufficient for 12-bit accuracy.