SLAU929A April   2024  â€“ June 2025 MSPM0C1104 , MSPM0G3505 , MSPM0G3506 , MSPM0G3507 , MSPM0H3216 , MSPM0L1105 , MSPM0L1227 , MSPM0L1227-Q1 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1304 , MSPM0L1305 , MSPM0L1306 , MSPM0L2227 , MSPM0L2227-Q1 , MSPM0L2228 , MSPM0L2228-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1MSPM0 Portfolio Overview
    1. 1.1 Introduction
    2. 1.2 Portfolio Comparison of Microchip AVR ATmega and ATiny MCUs to MSPM0
  5. 2Ecosystem and Migration
    1. 2.1 Software Ecosystem Comparison
      1. 2.1.1 MSPM0 Software Development Kit (MSPM0 SDK)
      2. 2.1.2 MPLAB X IDE vs Code Composer Studio IDE (CCS)
      3. 2.1.3 MPLAB Code Configurator vs SysConfig
    2. 2.2 Hardware Ecosystem
    3. 2.3 Debug Tools
    4. 2.4 Migration Process
    5. 2.5 Migration and Porting Example
  6. 3Core Architecture Comparison
    1. 3.1 CPU
    2. 3.2 Embedded Memory Comparison
      1. 3.2.1 Flash Features
      2. 3.2.2 Flash Organization
        1. 3.2.2.1 Memory Banks
        2. 3.2.2.2 Flash Memory Regions
        3. 3.2.2.3 NONMAIN Memory
      3. 3.2.3 Embedded SRAM
    3. 3.3 Power Up and Reset Summary and Comparison
    4. 3.4 Clocks Summary and Comparison
    5. 3.5 MSPM0 Operating Modes Summary and Comparison
      1. 3.5.1 Operating Modes Comparison
      2. 3.5.2 MSPM0 Capabilities in Lower Power Modes
      3. 3.5.3 Entering Lower-Power Modes
    6. 3.6 Interrupt and Events Comparison
      1. 3.6.1 Interrupts and Exceptions
      2. 3.6.2 Event Handler and EXTI (Extended Interrupt and Event Controller)
    7. 3.7 Debug and Programming Comparison
      1. 3.7.1 Bootstrap Loader (BSL) Programming Options
  7. 4Digital Peripheral Comparison
    1. 4.1 General-Purpose I/O (GPIO, IOMUX)
    2. 4.2 Universal Asynchronous Receiver-Transmitter (UART)
    3. 4.3 Serial Peripheral Interface (SPI)
    4. 4.4 I2C
    5. 4.5 Timers (TIMGx, TIMAx)
    6. 4.6 Windowed Watchdog Timer (WWDT)
    7. 4.7 Real-Time Clock (RTC)
  8. 5Analog Peripheral Comparison
    1. 5.1 Analog-to-Digital Converter (ADC)
    2. 5.2 Comparator (COMP)
    3. 5.3 Digital-to-Analog Converter (DAC)
    4. 5.4 Operational Amplifier (OPA)
    5. 5.5 Voltage References (VREF)
  9. 6References
  10. 7Revision History

Comparator (COMP)

The Microchip 8-bit AVR MCU family and MSPM0 family of parts both offer integrated comparators as optional peripherals on some devices. In the MSPM0 family, comparators are denoted as COMPx, where the 'x' final character refers to the specific comparator module being considered. The ATmega family feature a single comparator with one pair of inputs, whereas the ATtiny family feature up to three pair of inputs. The MSPM0 comparator module provides a windowed comparator functionality using its DAC with two programmable levels. Both MSPM0 and AVR have multiple channels that can take inputs from various internal and external sources, and can be used to trigger changes in power mode or truncate/control PWM signals. A summary of how the MSPM0 and AVR comparator modules compare feature-by-feature is included in Table 5-3.

Table 5-3 COMP Feature Set Comparison
FeatureATmegaATtinyMSPM0GMSPM0LMSPM0C
Available comparators11Up to 31

1

Number of positive and negative inputs1 pos, 1 negUp to 4 pos, 3 negUp to 4 pos, up to 3 negUp to 4 pos, up to 3 negUp to 4 pos, up to 3 neg
Output routingNoMultiplexed I/O PinsMultiplexed I/O PinsMultiplexed I/O PinsMultiplexed I/O Pins
InterruptInterrupt/Event InterfaceInterrupt/Event InterfaceInterrupt/Event InterfaceInterrupt/Event Interface
Noninverting input sources1 PosMultiplexed I/O PinsMultiplexed I/O PinsMultiplexed I/O PinsMultiplexed I/O Pins
DAC12 output(1)DAC8 output
DAC8 outputOPA1 Output(2)

DAC8 output

Internal VREF: 1.4 V and 2.5 V
OPA1 output(2)
Inverting input sourcesMultiplexed I/O PinsMultiplexed I/O PinsMultiplexed I/O pinsMultiplexed I/O PinsMultiplexed I/O Pins
NoNoInternal temperature sensorInternal temperature sensor
Bandgap: 1.1VInternal VREF: 1.024V, 2.056V, 2.500, 4.096 and VDDInternal VREF: 1.4V and 2.5VDAC8 outputDAC8 output
NoDAC8 outputDAC8 outputOPA0(3) output
NoNoOPA0 output (3)
Programmable hysteresisNoNone,

Small, medium, large

None, 10mV, 20mV, 30mVNone, 10mV, 20mV, 30mVNone, 10mV, 20mV, 30mV

No

Other values from 0V to VREF/VDD using DAC8Other values from 0V to VDD using DAC8Other values from 0V to VDD using DAC8
Register lockNoNoYes, some COMP registers (writes require key)Yes, some COMP registers (writes require key)Yes, some COMP registers (writes require key)
Window comparator configurationYesNoYesNo (single COMP)No (single COMP)
Input short modeNoNoYesYesYes
Operating modesNoActive, low powerHigh speed, low powerHigh speed, low powerHigh speed, low power
Fast PWM shutdownsNoNoYes (through TIMA fault handler)Yes (through TIMA fault handler)Yes (through TIMA fault handler)
Output filteringNoNoBlanking filterBlanking filterAdjustable analog filter
Adjustable analog filterAdjustable analog filter
Output polarity controlYNoYesYesYesYes
InterruptsRising edgeRising edgeRising edgeRising edgeRising edge
Falling edgeFalling edgeFalling edgeFalling edgeFalling edge
Both edgesBoth edgesOutput readyOutput readyOutput ready
Exchange inputs modeYesYesYesYes

Yes

Only on devices with DAC12 peripheral
Only on devices with OPA1 peripheral
Only on devices with OPA0 peripheral

COMP code examples

Information about COMP code examples can be found in the MSPM0 SDK examples guide.