SLAAEF9A November 2023 ā May 2025 MSPM0C1104 , MSPM0G3507 , MSPM0H3216 , MSPM0L1227 , MSPM0L1227-Q1 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1306 , MSPM0L2227 , MSPM0L2227-Q1 , MSPM0L2228 , MSPM0L2228-Q1
The RL78 and MSPM0 family of parts both offer integrated comparators as optional peripherals on some devices. In RL78, comparator is denoted as CMP, COMP, or COMPARATOR x, while in MSPM0 as COMPx. In RL78 G1F family, these x are numbered 0-1, and in MSPM0 family these x are numbered 0-2. In RL78 family, G1F series is used in BLDC motor, and have advance feature comparator, while the other series of RL78 mainly have a basic feature comparator. The comparator modules can take inputs from various internal and external sources, and can be used to trigger changes in power mode or control PWM signals. A summary of how the MSPM0 and RL78 comparator modules compare feature-by-feature is included in Table 5-3.
MSPM0H series and MSPM0C1103, MSPM0C1104 device do not support COMP.
| Feature | RL78 | MSPM0G | MSPM0L | MSPM0C |
|---|---|---|---|---|
| Available comparators | Up to 2 | Up to 3 | Up to 1 | Up to 1 |
| Output routing | External | Multiplexed I/O pins | Multiplexed I/O pins | Multiplexed I/O pins |
| Event linker controller | Interrupt or event interface | Interrupt or event interface | Interrupt or event interface | |
| Positive input | External 4 analog pins input | Multiplexed I/O pins | Multiplexed I/O pins | Multiplexed I/O pins |
| DAC12 output (1) | DAC8 output | DAC8 output | ||
| DAC8 output | ||||
| PGA output Comparator 0 |
Internal VREF: 1.4 V and 2.5 V | / | / | |
| OPA1 output (2) | OPA1 output (2) | OPA1 output (2) | ||
| Negative input | External analog pin input | Multiplexed I/O pins | Multiplexed I/O pins | Multiplexed I/O pins |
| Internal temperature sensor | Internal temperature sensor | Internal temperature sensor | ||
| Internal VREF: 1.45 V | Internal VREF: 1.4 V and 2.5 V | DAC8 output | DAC8 output | |
| 8 bit DAC Comparator 1 |
DAC8 output | OPA0 (3) output | OPA0 (3) output | |
| OPA0 output (3) | ||||
| Programmable hysteresis | None, 10mV, 20mV, 30mV | None, 10mV, 20mV, 30mV | None, 10mV, 20mV, 30mV | None, 10mV, 20mV, 30mV |
| Other values from 0V to VREF/VDD using DAC8 | Other values from 0V to VDD using DAC8 | Other values from 0V to VDD using DAC8 | ||
| Register lock | No | Yes, some COMP registers (writes require key) | Yes, some COMP registers (writes require key) | Yes, some COMP registers (writes require key) |
| Window comparator configuration | Timer window with TAU0 | Yes | No (single COMP) | No (single COMP) |
| Input short mode | No | Yes | Yes | Yes |
| Operating modes | Run | High speed, low power | High speed, low power | High speed, low power |
| Fast PWM shutdowns | Yes | Yes (through TIMA fault handler) | No | No |
| Output filtering | Elimination digital filter (3 cycles) | Blanking filter | Blanking filter | Blanking filter |
| Adjustable analog filter | Adjustable analog filter | Adjustable analog filter | ||
| Output polarity control | Yes | Yes | Yes | Yes |
| Interrupts | Rising edge | Rising edge | Rising edge | Rising edge |
| Falling edge | Falling edge | Falling edge | Falling edge | |
| Both edges | Output ready | Output ready | Output ready | |
| Exchange inputs mode (4) | No | Yes | Yes | Yes |
COMP Code Examples: information about COMP code examples can be found in the MSPM0 SDK examples guide.