Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes


PIC32MK MCU’s offer a range of communications peripherals combined with a rich feature set of high performance analog motor control functions.

PIC32MK family devices combine 32-Bit, 120Mhz performance with up to 1MB of Flash memory, and a rich peripheral set targeting applications such as motor control, industrial control and Industrial Internet of Things (IIoT) and multi-channel CAN applications.

Key Features

  • MIPS32® microAptiv™ 32-Bit Core
  • Floating Point and DSP extensions support
  • Up to 1MB of Dual-Panel Live Update Flash and 256KB RAM
  • Up to 4 CAN2.0
  • Up to 2 Full Speed USB
  • Up to 6 UART Modules
  • Up to 6 SPI Ports

Motor Control Integration including

  • 7 12-Bit 3.75-MSPS Each ADC Cores
  • 3 12-Bit DAC
  • 4 OpAmps
  • 5 Analog Comparators
  • 12 16-Bit PWM Timers
  • 6 Quadrature Encoder Interfaces

Click images to enlarge

Sensorless Single Motor Drive with PIC32MK

By utilizing the internal OpAmps of the PIC32MK we reduce the need for external devices. Additionally, with the multiple ADC conversion cores of this series, we can dedicate an ADC per motor phase that we want to measure, rather than sharing the conversion of 2 or more phases on a single ADC. This reduces code complexity as well as offers increased resolution as we are capturing more samples per phase without having to calculate complex timing between phases on a single ADC. Internal high speed comparators with PWM fault triggering are also used as over-current protection across the two measured phases.

Sensorless Dual Motor Drive with PIC32MK

Many motor control applications today have multiple motors, and the PIC32MK series of MCU’s is up to the challenge of driving dual, sensorless motor applications with a hefty selection of integrated peripherals.

Similar to the block diagram for single motor, dual shunt sensorless control, with two motors we double the peripheral requirements. As mentioned before, with 7 ADC conversion cores, we don’t have to worry about sharing converters between phases or motors, significantly reducing the software timing complexity overhead. All 4 OpAmps are utilized, and four of five comparators are utilized.

Sensored Motor Control with PIC32MK

For applications requiring more than just speed and torque control, but also requiring absolute positioning (rotor angle) measurements, PIC32MK is extremely well positioned for such applications.  With six quadrature encoder interfaces this makes PIC32MK an excellent fit for multi-axis CNC and robotics.  Many of these applications utilize Stepper Type motors which have high torque holding and are easy to accurately control. The PWM modules on PIC32MK can be independently timed, allowing for multi-axis control. When coupled with a smart stepper driver, PIC32MK has the ability to drive up to 6 stepper motors from a single MCU while providing high precision sensored feedback.

Simulation and modeling tools

PIC32MK devices are supported the MPLAB Device Blocks for Simulink package.

The MPLAB® Device Blocks for Simulink® provide a set of user interfaces and Simulink peripheral blocks for the dsPIC®30, dsPIC33 DSCs and PIC32MK MCUs. Standalone applications can be created from a Simulink discrete time model by adding blocks provided by Microchip. Code for the application is generated, compiled and loaded on a target in a single, one-push-button step. Also provided are many examples in the form of demo models, including a complete BLDC motor control application included in the package.

The latest versions now have support for single-shunt motor control algorithms and also includes Simulink® models for several additional examples.

Additionally, PIC32MK devices are supported in the open-source simulation package Scilab. Scilab is a 2-piece modeling environment made up of the Scilab main, and Xcos system modeler.

simulink_logo200px-min scilab_logo200px-min

Development Boards & Software

Software support for PIC32MK for peripherals, application demo’s and motor control applications are contained in MPLAB Harmony. MPLAB® Harmony is a flexible, abstracted, fully integrated firmware development platform for PIC32 microcontrollers. It takes key elements of modular and object oriented design, adds in the flexibility to use a Real-Time Operating System (RTOS) or work without one, and provides a framework of software modules that are easy to use, configurable for your specific needs, and that work together in complete harmony.

MPLAB Harmony includes a set of peripheral libraries, drivers and system services that are readily accessible for application development. The code development format allows for maximum re-use and reduces time to market.

dspicdem-mclv-2-development-boardHardware support for PIC32MK devices utilizes traditional Microchip hardware with the addition of Plug-In-Module’s supporting various MCU’s. Code is available within Harmony for supporting Back-EMF FOC of a BLDC motor and utilizing the MCLV-2 Low Voltage Motor Control Kit. Customers looking to develop on PIC32MK that have existing hardware, or customers purchasing new hardware, will also need to purchase the PIC32MK1024 Motor Control PIM – MA320024- to develop PIC32MK applications. Support for the MCHV-2 High Voltage kit will be available soon.