3.1 Migration Guidelines
The general migration guidelines provide recommendations for developers to successfully migrate an application developed for an 8-bit AVR or PIC16F/PIC18F microcontroller to the PIC32CM microcontroller family. The following subsections provide a brief summary of the general guidelines for successful migration.
- I/O pin compatibility—The 8-bit AVR, PIC16F, PIC18F and PIC32CM microcontroller families feature highly configurable I/O pins that support pin multiplexing for peripheral functions, as well as interrupt and event generation on pin changes. Although the peripherals in PIC32CM microcontrollers may use different I/O pins for their functions, they offer greater flexibility because peripheral pin multiplexing can be configured through the I/O PORT pin controller. Therefore, when migrating 8-bit microcontroller application firmware, it is important to correctly configure the relevant PIC32CM microcontroller I/O pins for peripheral functionality using the peripheral multiplexing and pin configuration registers.
- Device package compatibility—PIC32CM microcontrollers are available in 28‑pin, 32‑pin, 48‑pin, and 64‑pin variants, as well as different package options, similar to the 8‑bit AVR, PIC16F and PIC18F microcontrollers. Some devices with the same pin count and package may not be direct drop‑in replacements for 8-bit MCUs and may require PCB layout changes when migrating an existing product. However, the PIC32CM PLxx family of microcontrollers (for example, PIC32CM PL10) features better pin compatibility with AVR devices, allowing them to serve as direct drop-in replacements. Available in 28‑pin SOIC/SPDIP or 32‑pin, 48‑pin, and 64‑pin VQFN/TQFP packages, the PIC32CM PLxx family offers seamless migration from AVR Dx/Ex/Sx/Lx family devices without requiring PCB layout changes.
- Memory size—The PIC32CM microcontrollers support up to 128 KB of Flash and 16 KB of SRAM, enabling more complex product designs with higher memory demands. Users must select an MCU that meets the application’s memory requirements when migrating an existing product design based on an 8-bit microcontroller.
- Peripheral compatibility—In addition to standard system peripherals, several peripherals are common across the 8-bit AVR, PIC16F, and PIC18F microcontroller families and the PIC32CM microcontroller families. The PIC32CM MCUs also provide a more advanced set of digital and analog peripherals with enhanced functionality. Therefore, depending on the application requirements, developers must evaluate peripheral compatibility and choose the appropriate PIC32CM microcontroller when migrating existing designs based on 8-bit microcontrollers.
- Firmware compatibility—The peripheral registers are not directly compatible among the AVR, PIC16F/PIC18F, and PIC32CM microcontroller families. As a result, firmware developed for the AVR, PIC16F, or PIC18F families of MCUs is not directly compatible with PIC32CM microcontrollers. Therefore, firmware updates are required to accommodate differences in register structures and bit‑naming conventions when migrating application firmware from 8-bit microcontrollers. Refer to the API Mapping section for detailed information.
Refer to Migration Guide From AVR® to PIC32CM MCUs and Migration Guide from PIC16F/PIC18F to PIC32CM MCUs for a deeper understanding of compatibility between AVR/PIC16F/PIC18F and PIC32CM microcontrollers.
