MPLAB® Device Blocks for Simulink® Introduction

MPLAB® Device Blocks for Simulink® is a block set developed by Microchip that integrates within the MATLAB®/Simulink environment. It contains a suite of blocks added to the Simulink Library and scripts for MATLAB that allows the configuration of a microcontroller and its peripherals. It also provides the ability to design complex algorithms using tools such as Simulink instead of hand-coding. This facility enables designers to go back and forth from high-level simulation to real hardware test efficiently removing the burden of low-level programming tasks.

Simulink_Blockset_Lib_1.PNG
Click image to enlarge.
MPLAB Device Blocks for Simulink Library

MPLAB Device Blocks for Simulink make it easy to develop complex designs using Microchip’s dsPIC30, dsPIC33, PIC32MK, and PIC32MZ Digital Signal Controllers (DSCs). This support package provides a set of user interfaces to the MathWorks® Simulink graphical environment for simulation and model-based design, where the code for the application is generated, compiled, and loaded onto a target in a single, one-click step.

This block set also includes multi-rate and interrupt-capable device blocks and provide complete, model-based control of most dsPIC® and PIC32MK DSCs on-chip peripherals for greater flexibility and higher utilization, including the following:

  • Digital I/Os
  • Analog-to-Digital Converters (ADC)
  • Pulse Width Modulations (PWM)
  • Change notifications
  • Output compares
  • Input captures
  • Quadrature Encoder Interfaces (QEI)
  • Interrupts and resets

It also includes communication interfaces such as I²C, Serial Peripheral Interface (SPI), and UARTs. Additionally, designers can monitor, tune, log, and instrument their algorithms and applications in real time, via features like External-Mode, Processor in the Loop (PIL) and our PIC® GUI interface.

The Device Blocks are also simple to set up and one Simulink model can be easily modified to target any dsPIC DSC, which enables easy in-process design changes and seamless migration. The Code Replacement Library (CRL), enabled in one click, replaces parts of the MathWorks generated code by its Microchip fast implementation counterpart, which takes advantage of the chip specialized architecture. The Device Blocks’ facility to invoke dsPIC33/PIC32MK/PIC32MZ dedicated functions written in C (via a C function-call block) allow designers to add their custom driver or to use one of Microchip’s numerous application, algorithm, and operation libraries directly from a Simulink model.

© 2018 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.