Software Requirements

Supported Operating Systems: Windows and Linux

ComponentRequirements
1. MATLAB/Simulink
MathWorks
Required:
MATLAB R2018b to R2025b
Simulink
Embedded Coder (includes Simulink Coder)

Optional:
• Fixed-Point Designer
• MATLAB Coder
• Stateflow / Stateflow Coder
• Motor Control Blockset
• System Identification Toolbox
• DSP System Toolbox
• Signal Processing Toolbox
• Control System Toolbox
• Optimization Toolbox
2. MPLAB Device Blocks
MATLAB File Exchange | GitHub Releases
• Peripheral blocks (PWM, ADC, UART, Timers, etc.)
• Board Templates
• Standalone, External-Mode, PIL
3. Microchip Compiler
XC Compilers
(Free - no time/size limits)
XC-DSC for dsPIC30F/33F/33E/33C/33A
XC32 for PIC32/PIC32A/SAM (ARM)
4. MPLAB X IDE
MPLAB X
• Programming/debugging tool
• Supports ICD4, ICD5, PICkit4, PICkit5, PKOB4, Snap
Model-Based Design Workflow
Model-Based Design Workflow
Required Microchip software tools are free. Free compilers support optimization up to -O2; -O3 and -Os require paid license.

Hardware Requirements

Target Board

The blockset supports any board equipped with a compatible dsPIC DSC, PIC32 or SAM microcontroller.

Ready-to-use Simulink templates with preconfigured peripherals are provided for the following development boards:

Development BoardPIM or DIM - DSC MODULESDevelopment BoardPIM or DIM - DSC MODULES
LVMC
dsPIC33CK LVMC Board (DM330031)
• Integrated dsPIC33CK256MP508 DSC
dsPIC33CDV
dsPIC33CDV Motor Control Development Board
EV14E50A - dsPIC33CDV64MC106
EV04R09A - dsPIC33CDVL64MC106
MCLV-48V-300W
MCLV-48V-300W Inverter Board (EV18H47A)
• dsPIC33AK128MC106 DIM EV68M17A (Internal/External OpAmp)
• dsPIC33CK256MP508 DIM EV62P66A (Internal/External OpAmp)
• dsPIC33CK64MC105 DIM EV03J37A (Internal/External OpAmp)
MCLV-2
dsPICDEM MCLV-2 Development Board (DM330021-2)
• dsPIC33CK256MP508 PIM MA330041-2 (Internal) / MA330041-1 (External)
• dsPIC33CK64MC105 PIM MA330051-2 (Internal) / MA330051-1 (External)
• dsPIC33EP256MC506 PIM MA330031 (External OpAmp)
Portable Power Tool
Portable Power Tool Reference Design (03-01156-R2)
• Reference design - Potentiometer on Throttle, buttons and encoder on AUX board
Curiosity
dsPIC33AK Curiosity Platform Development Board (EV74H48A)
• dsPIC33AK128MC106 General Purpose DIM EV02G02A (External Mode ready)
Curiosity Nano
Curiosity Nano (EV17P63A)
• Integrated dsPIC33AK512MPS506 DSC
• Power supply and digital power management applications
• On-board debugger with USB-UART bridge (no external programmer required)

Programmer/Debugger

Required for boards without integrated programmers. Supported programmers: ICD4, ICD5, PICkit4, PICkit5, PKOB4, Snap

J32 programmer (Segger) supports SAM microcontrollers only.

Recommended for boards that lack USB-to-UART bridge or when higher bandwidth (>460 kbaud) is required.

High-bandwidth communication (External Mode, 12 Mbaud) requires FTDI cables (All FTDI Cables):

Installation

Blockset Installation

In MATLAB Add-On Explorer, search for “MPLAB” and click Add.

Offline installation or older MATLAB releases:

Custom installation location:

  • Download the .mltbx package and install.p script from GitHub Releases page and place them in the same folder
  • Run install.p - at prompt “Install as an add-on using MathWorks predefined folder? Y/N [Y]”, select N and enter your custom path
MPLAB Add-On Explorer Installation
MATLAB Add-On Explorer - Search for “MPLAB”

Check Blockset Installation

Type picInfo in the MATLAB Command Window and follow the verification link.

picInfo(‘check’) command prompt output with 3 programmers attached:

>> picInfo('check')

--------------------------------------------
   Microchip Blockset 3.xx Installed:
--------------------------------------------

Refreshing cache...
   - Blockset in C:\Users\M91449\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink(2)

  5 Compiler(s) found for dsPIC chip:
   - C:/Program Files/Microchip/xc16/v2.10  (XC16  v2.10)
   - C:/Program Files/Microchip/xc-dsc/v3.20  (XC-DSC  v3.20)
   - C:/Program Files/Microchip/xc-dsc/v3.21  (XC-DSC  v3.21)
   - C:/Program Files/Microchip/xc-dsc/v3.30  (XC-DSC  v3.30)
   - C:/Program Files/Microchip/xc-dsc/v4.00_TC1  (XC-DSC  v4.00_TC1)

  1 Compiler(s) found for 32 bits chip:
   - C:/Program Files/Microchip/xc32/v4.60  (XC32  v4.60)

   Inteface to program chip found:
     - MDB interface in C:\Program Files\Microchip\MPLABX\v6.25\mplab_platform\bin\mdb.bat
     - IPE interface in C:\Program Files\Microchip\MPLABX\v6.25\mplab_platform\mplab_ipe\ipecmd.jar
     - Java used from C:\PROGRA~1\MICROC~1\MPLABX\v6.25\sys\java\ZULU88~1.422\bin\java.exe

  Testing programmer interface takes few seconds...
Check programmer connected with MDB ...(10s timout)
Index               Tool Type           Serial Number              IP Address	Description
0                    icd5      020054102RYN003838                     N/A	MPLAB ICD 5
0                 pickit5      020026702RYN013775                     N/A	MPLAB PICkit 5
0                    snap      021038102RYN001730                     N/A	MPLAB Snap ICD

     3 programmer found.
       - MPLAB ICD 5(020054102RYN003838)
       - MPLAB PICkit 5(020026702RYN013775)
       - MPLAB Snap ICD(021038102RYN001730)

Troubleshooting

Commands for the MATLAB prompt

Blockset Configuration:

  • picsetup - Reconfigure paths and refresh cache (run from mchp folder)
  • rehash toolboxcache - Refresh MATLAB toolbox cache

Simulink & Code Generation:

  • bd close all - Close all Simulink models and clear memory
  • RTW.TargetRegistry.getInstance('reset') - Refresh compiler detection
  • sl_refresh_customizations - Refresh Simulink customizations

Documentation:

  • builddocsearchdb(fullfile(fileparts(which('MCHP_dsPIC_stf.tlc')), '../', 'doc')) - Refresh toolbox documentation index

For additional help, visit the Microchip MATLAB Forum or Discussion panel on MathWorks File Exchange

Next Steps

Quick Start Guide | Supported Devices | Board Templates | External Mode & PIL