Pin assignments matching the physical board layout
Example algorithms demonstrating typical use cases (motor control, sensor interfaces)
Validated configurations tested on actual hardware
Key Benefit: Templates eliminate hours of configuration work, allowing you to start developing control algorithms immediately. Simply select your board template, customize the algorithm, and build.
Why Use Board Templates?
Benefit
Description
Fast Prototyping
Start coding control algorithms in minutes instead of hours spent on peripheral configuration
Validated Hardware
All pin assignments and peripheral settings verified on actual hardware - reduces debugging time
Best Practices
Templates follow Microchip recommended configurations for optimal performance
Learning Tool
Study working examples to understand peripheral configuration patterns
Easy Portability
Switch between boards by simply loading a different template - same algorithm, different hardware
Available Board Templates
MCLV-2 (Motor Control Low Voltage)
Target Applications: Low-voltage motor control, BLDC/PMSM development
The MCLV-48V-300W baseboard accepts motor-control plug-in modules (MC DIM)
from several dsPIC families. Four DIMs are supported today; each ships as
a dedicated template with its own PWM/ADC/QEI pin map and Internal vs
External Op-Amp variant preset:
All four document both Op-Amp hardware paths (Internal via DIM on-chip
amplifier, External via MCP6024 on the baseboard) with inline shunt and
gain formulas and links to the relevant Datasheets. The Op-Amp variant
is switched by the boardVariants mask parameter on the BOARD
subsystem; switching rewires the current-sense signal M1_I* (internal)
โ M1_I*_EXT (external) โ see DS50002927A
Table 3-2 for the jumper / resistor changes needed on the baseboard.
MCHV-230VAC-1.5kW Inverter Board (EV78U65A)
MCHV-230VAC-1.5kW โ dsPIC33AK128MC106 DIM (Perseus)
Target Applications: High-voltage motor control, appliance drives,
HVAC compressors, industrial 1-phase โ 3-phase inverters, active
Power-Factor Correction (PFC) front-end.
Key Features:
230 VAC single-phase mains input, 325 V DC bus, 1.5 kW continuous
Three-phase IPM inverter with integrated gate drivers
Active PFC front-end (boost) โ 64 kHz switching loop, separate from motor loop
Perseus DIM (dsPIC33AK128MC106) with 20 MHz + 200 MHz dual-clock architecture
Template Model:MCHP_MCHV230VAC1p5kW_dsPIC33AK128MC106_DIM.sltx.
Includes the full PINOUT for both motor loop and PFC loop, dual Op-Amp
variants (DIM on-chip vs baseboard MCP6024), HV safety notice, and
clickable links to the Perseus DIM Info Sheet and the MCHV inverter
schematic (03-00505-R1.0).
High Voltage. 325 V DC bus, lethal currents. Use isolated probes. Wait
for bleeder-resistor discharge before handling. Bench test only with the
inverter de-energised and DC bus verified empty via voltmeter.
Motor Control Dev Board (33CDV64MC106)
Target Applications: Dual-core motor control applications
Target Applications: Power supply control, DC-DC converters, digital power management
Key Features:
Compact nano form factor (breadboard-compatible)
dsPIC33AK512MPS506 (32-bit DSC with FPU)
High-resolution PWM (78 ps Fine Edge Placement)
4 PWM generators optimized for power electronics
3 ADC cores (40 MSPS) with 25 input channels
On-board debugger with USB-UART bridge (no external programmer needed)
USB-C power and programming
Multiple communication interfaces (CAN, I2C, SPI, UART)
Template Model:MCHC_CuriosityNano_EV17P63A_dsPIC33AK512MPS506.sltx
โ Digital power supply control, DC-DC converter PWM, multi-phase power management.
Curiosity Nano (EV88G73A)
Curiosity Nano (EV88G73A) โ dsPIC33CK64MC105
Target Applications: Compact motor-control development, sensor
prototyping, rapid algorithm bring-up on the classic 16-bit dsPIC33C
family.
Key Features:
Compact nano form factor (breadboard-compatible)
dsPIC33CK64MC105 (16-bit DSC, 100 MIPS)
Motor-control-oriented PWM and QEI peripherals
ADC with motor-current-sense channels
PKOB nano on-board debugger + USB-CDC virtual COM port (460800 baud)
LED0 on RD10, SW0 on RD13 โ same UX convention as the AK Curiosity Nano
Template Model:MCHC_CuriosityNano_EV88G73A_dsPIC33CK64MC105.sltx
โ Flat model (no BOARD subsystem) with Counter-Free-Running example + LED
blink; ready to extend with your algorithm. Use Ctrl+D to refresh
remappable pin popups after wiring up peripherals.
How to Use Board Templates
Method 1: Creating New Model from Template
Open Simulink: Launch MATLAB and open the Simulink Start Page
One of the key advantages of templates is easy portability. To migrate an algorithm from one board to another:
Save Current Model: Backup your algorithm implementation
Extract Algorithm: Copy your control algorithm subsystem (without peripheral blocks)
Open Target Template: Load the template for your new target board
Paste Algorithm: Insert your control algorithm into the new template
Verify Connections: Ensure algorithm inputs/outputs connect to peripheral blocks
Adjust Parameters: Update scaling factors, sample times if board specs differ
Build & Test: Compile for new target and verify functionality
Example: Moving a FOC algorithm from MCLV-2 (dsPIC33CK) to MCLV-300W48V (dsPIC33A) requires only:
Updating current sensor scaling (different op-amp gains)
Adjusting PWM frequency (different board power stage limits)
Optionally switching from fixed-point to floating-point (utilizing dsPIC33A's FPU)
The core control algorithm remains unchanged!
Template Customization
Common Customization Tasks
Task
Steps
Change PWM Frequency
Double-click PWM block
Add ADC Channel
Double-click ADC block
Enable CAN Communication
Add “CAN Config” block from MCHP library
Change Clock Speed
Double-click Master block
Advanced Customization
Multi-rate Scheduling: Add subsystems with different sample times to implement multi-tasking
Fixed-Point Optimization: Use Fixed-Point Tool to convert floating-point to fixed-point for faster execution
Pin Mismatch: Verify template pin assignments match your board revision
Scaling Errors: Check ADC/PWM scaling factors match your hardware (sensor gains, voltage levels)
Timing Issues: Verify sample times and peripheral frequencies are correctly configured
Real-time Violations: Use MCU Load block to check for overload conditions
Creating Custom Templates
Once you’ve configured a model for a custom board, you can save it as a template for reuse:
Configure Model: Set up all peripherals and verify working on hardware
Clean Algorithm: Replace specific control logic with generic placeholder algorithm
Add Documentation: Include block comments explaining peripheral configuration
Create Template File: Save as .sltx template file (File โ Save As โ Simulink Template)
Add Metadata: Fill in template description, tags, and preview image
Share: Distribute template to team or organization
Custom Board Note: When creating templates for custom hardware, thoroughly document:
Pin assignments and their mapping to board connectors
Clock configuration rationale and limitations
Scaling factors for analog inputs (sensor gains, voltage dividers)
Known hardware limitations or errata workarounds
Example Use Case: DC Motor Control
Using the MCLV-2 template, you can implement a cascaded PI controller for DC motor speed control in under 30 minutes:
Load Template: Open “MCLV2_dsPIC33CK_MotorControl_Template”
Pre-configured Peripherals:
PWM: 20kHz, center-aligned, 1ยตs dead-time
ADC: Synchronized to PWM, measuring motor current (AN0) and potentiometer (AN13)
QEI: 1000-line encoder, speed measurement at 2ms rate
UART: 115200 baud for picgui data logging
Add Control Algorithm:
Inner current loop: PI controller at 50ยตs (20kHz)
Outer speed loop: PI controller at 1ms (1kHz)
Speed reference from potentiometer
Build & Deploy: Press Ctrl+B to generate code and program board
Tune & Visualize: Use picgui to monitor speed/current in real-time and adjust PI gains
Result: Working motor control system in 30 minutes instead of several hours of manual configuration!