We detect you are using an unsupported browser. For the best experience, please visit the site using Chrome, Firefox, Safari, or Edge. X

Model-Based Design, Code Generation and Real-Time Debugging


Simplify your motor control design with the MATLAB® Simulink® and our MPLAB® Device Blocks for Simulink tools that provide a Model-Based Design (MDB) platform for real-time control applications. The code generated from the Simulink model enables our Digital Signal Controllers (DSCs) and microcontrollers (MCUs) to support development boards and deliver a flexible motor control solution

MPLAB Device Blocks for Simulink


Code Generation Blocks for dsPIC33 DSCs, PIC32 and SAM MCUs for Simulink's Embedded Coder


Create stand-alone applications from a Simulink discrete time model and with just one click generate, compile and load the code for your application onto your target device. The MPLAB Device Blocks for Simulink is a free set of user interfaces and Simulink peripheral blocks for developing complex designs based on our dsPIC33 DSCs and PIC32, SAM E70, SAM E5x, SAM D2x and SAM C2x MCUs. The package also includes many examples in the form of demo models to further simplify your development, such as a complete Permanent Magnet Synchronous Motor (PMSM) and Brushless DC (BLDC) motor control applications.

These blocks are supported by the following Simulink design tools:

  • Fixed-Point Designer
  • Control System Toolbox
  • DSP System Toolbox
  • Motor Control Blockset

Key Features of MPLAB Device Blocks for Simulink


  • Blocks for peripherals: Digital In/Out, Analog-to-Digital Converter (ADC), Pulse-Width Modulation (PWM), Change Notification, Output Compare, Input Capture, QEI, I2C, SPI, UART, Interrupt and Reset
  • Target configuration blocks: Master Block, Simulink Reset Config, Compiler Option, Data Sheet, MCU Overload, MCU Load, Task State and Scheduler Option
  • Ability to invoke dedicated functions written in C through a “C Function Call” block
  • Real-time view/analyze or log variables within MATLAB through a configurable, PICGUI interface
  • Supports MathWorks® Processor In the Loop (PIL) and External-Mode
  • Creates a ready-to-use MPLAB X Integrated Development Environment (IDE) project
  • Supports over 500 devices
  • Supports our motor control development boards or any boards using a supported DSC or MCU device

Choose a Microchip Motor Control Development Board Template


Our motor control development board templates support the selection of motor control DSCs/MCUs and peripheral configuration from our product portfolio and the selection of our supported motor control development board. The templates also facilitate easy migration between the supported motor control development boards or between the various motor control devices to quickly evaluate different control options.

Simulation and Code Generation


You can simulate a control algorithm, generate the code and program a dsPIC® DSC or SAM MCU from the Simulink model. You can use the MPLAB X IDE for the final tuning of the code generated from the model.

Supported Demo Hardware


dsPIC33CK Low-Voltage Motor Control (LVMC) Development Board

MCS MCLV-48V-300W Development Board

dsPIC33CK256MP508 Motor Control DIM

dsPIC33CK64MC105 Motor Control DIM

dsPICDEM™ Motor Control Low Voltage (MCLV-2) Development Board

ATSAME70 Motor Control Plug-In Module

ATSAME54 Motor Control Plug-In Module

ATSAMC21 Motor Control Plug-In Module

PIC32MK MCM Motor Control Plug-In Module

PIC32MK1024 Motor Control Plug-In Module

PIC32CM MC00 Motor Control Plug-In Module

Simulink Models


MATLAB Simulink Model for MCLV-48V-300W dsPIC33CK64MC105 FOC Optical Encoder

Regenerative Braking

MATLAB MCLV-48V-300W dsPIC33CK64MC105 FOC Sliding Mode Observer (SMO)

MATLAB LVMC ATSAME70Q21 Sensorless PMSM FOC

MATLAB LVMC ATSAME70Q21 Sensored PMSM FOC Position Control

MATLAB LVMC ATSAME70Q21 Sensored PMSM FOC

Motor Control Products


Documentation and Resources


Title
dsPIC33CK Low-Voltage Motor Control Development Board (DM330031) User's Guide Download
Motor Control Low-Voltage 48V-300W Inverter Board User's Guide Download
dsPICDEM MCLV-2 (DM330021-2) Development Board User's Guide Download

Need Some Help?


We are here to support you. Contact our Client Success Team to get assistance with your design.