1 What is the MCC Melody PIC16/18 Diagnostic Library?

The MPLAB® Code Configurator (MCC) Melody PIC16/18 Diagnostic Library is a suite of diagnostic tests implementing the diagnostics mechanisms described in the device’s functional safety manual. The library is distributed as an MPLAB X MCC Melody module, which allows for quick and easy configuration using graphical interfaces. MCC generates code for MPLAB X and the MPLAB XC8 compiler projects, based on the selections and configuration.

Instructions to install or update the library, add the diagnostic tests, and run the examples in MCC Melody are available in Getting Started with the MCC Melody AVR® and PIC16/18 Diagnostic Libraries .

ComponentSafety MeasurePurpose
CPUSW_CPU_REGISTER_RESET_STATE_CHECK_01Verify registers at start-up
SW_CPU_REGISTER_TEST_01Verify internal CPU registers
SW_CPU_SELF_TEST_LIB_01Verify functional correctness of all CPU instructions/core features
FlashSW_FLASH_MEMORY_CHECKSUM_CRC_TEST_01Compute the periodic checksum or the CRC computation on the entire or user-defined region of Flash memory
EEPROMSW_EEPROM_MEMORY_CHECKSUM_CRC_TEST_01Compute the periodic checksum or the CRC computation on the entire or user-defined region of EEPROM memory
SRAMSW_SRAM_MARCH_TEST_01Check of the entire SRAM using March C- test
WDTSW_WATCHDOG_SIMPLE_TIMER_STARTUP_TEST_01Validate the ability of the Watchdog Timer running in Non-Windowed mode to reset the device
WWDTSW_WATCHDOG_WINDOWED_TIMER_STARTUP_TEST_01Validate the ability of the Watchdog Timer running in Windowed mode to reset the device in two ways:
  1. The timer being cleared too early.
  2. The timer being cleared too late.
Clock SOSCSW_CLOCK_PERIODIC_MONITOR_01Check of stable and reliable oscillation being present using an external secondary oscillator with 32768 Hz frequency
Clock LineSW_CLOCK_PERIODIC_MONITOR_02Check of stable and reliable oscillation being present using an external 60 Hz line frequency
Interrupt ControllerSW_INTERRUPT_FREQUENCY_TEST_01Using independent time slot monitoring, check whether the number of interrupts that occurred is within a predefined range