SLAU929 April   2024 MSPM0C1104 , MSPM0G3505 , MSPM0G3506 , MSPM0G3507 , MSPM0L1105 , MSPM0L1304 , MSPM0L1305 , MSPM0L1306

 

  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

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
Feature ATmega ATtiny MSPM0G MSPM0L
Available comparators 1 1 Up to 3 1

Number of positive and negative inputs

1 pos, 1 neg Up to 4 pos, 3 neg Up to 4 pos, 3 neg Up to 2 pos, 2 neg
Output routing No Multiplexed I/O Pins Multiplexed I/O Pins Multiplexed I/O Pins
Interrupt Interrupt/Event Interface Interrupt/Event Interface Interrupt/Event Interface
Noninverting input sources 1 pos Multiplexed I/O Pins Multiplexed I/O Pins Multiplexed I/O Pins
DAC12 output(1) DAC8 output
DAC8 output OPA1 Output(2)
Internal VREF: 1.4 V and 2.5 V
OPA1 output(2)
Inverting input sources Multiplexed I/O Pins Multiplexed I/O Pins Multiplexed I/O pins Multiplexed I/O Pins
No No Internal temperature sensor Internal temperature sensor
Bandgap: 1.1V Internal VREF: 1.024V, 2.056V, 2.500, 4.096 and VDD Internal VREF: 1.4V and 2.5V DAC8 output
No DAC8 output DAC8 output OPA0(3) output
No No OPA0 output (3)
Programmable hysteresis No None, small, medium, large None, 10mV, 20mV, 30mV None, 10mV, 20mV, 30mV
No Other values from 0V to VREF/VDD using DAC8 Other values from 0V to VDD using DAC8
Register lock No No Yes, some COMP registers (writes require key) Yes, some COMP registers (writes require key)
Window comparator configuration No No Yes No (single COMP)
Input short mode No No Yes Yes
Operating modes No Active, low power High speed, low power High speed, low power
Fast PWM shutdowns No No Yes (through TIMA fault handler) No
Output filtering No No Blanking filter Blanking filter
Adjustable analog filter Adjustable analog filter
Output polarity control No Yes Yes Yes
Interrupts Rising edge Rising edge Rising edge Rising edge
Falling edge Falling edge Falling edge Falling edge
Both edges Both edges Output ready Output ready
Exchange inputs mode No No Yes 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.