Skip to content

Commit e068ce1

Browse files
SHYAMP8arjuntm94
authored andcommitted
Pull request #1: Feature/Release V1
Merge in MCU16CE/matlab-dspic33a-curiosity-simple-filter-example from ~I50990/matlab-dspic33a-curiosity-simple-filter-example:feature/Release_V1 to develop * commit '51b1abeb7207691ccf5e4432434e9b19d48d9b44': Minor correction Readme main.json file is updated. Updated gitignore file. Added PDF version of Readme to the docs folder. Copied the project folder,images and Readme files from- Commit: 7442ff61ab3a7ddd33830cefc63a9ab15da71b11 [7442ff6] Parents: c551fd5631 Date: Tuesday, October 7, 2025 2:56:26 PM Updated the following files the release- 1.changelog.md 2.Jenkinfile 3.main.json
2 parents a8f881c + 51b1abe commit e068ce1

25 files changed

+160
-31
lines changed

.citd/Jenkinsfilek8s

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ pipeline {
8080

8181
stage('Build') {
8282
steps {
83-
script {
83+
script {
84+
sh("npm install -g xml2js")
85+
sh("npm link xml2js")
8486
mplabxProjectBuild(
8587
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}"
8688
)

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
#Excluding Files/Folders Auto-Generated by Test Harness
2020
.generated_files/
2121

22+
#Excluding Files/Folders Auto-Generated by Simulink
23+
*.X
24+
*.slx.autosave
25+
*.slx.original
26+
*.slxc
27+
*.mat
28+
*.tlc
29+
*.tlh
30+
*.xml
31+
*.tmw
32+
*.dmr
33+
*.l
34+
2235
# Excluding Netbeans specific build directories and file types
2336
~*.*
2437
.generated_files/

.main-meta/main.json

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,46 @@
44
"content":{
55
"metaDataVersion":"1.0.0",
66
"name":"com.microchip.matlab.project.matlab-dspic33a-curiosity-simple-filter-example",
7-
"version":"x.x.x",
8-
"displayName":"xxxxxxxxxxxxxxx",
7+
"version":"1.0.0",
8+
"displayName":"MATLAB/Simulink Model Example Using MPLAB Device Blocks for dsPIC33AK128MC106 Curiosity GP DIM",
99
"projectName":"matlab-dspic33a-curiosity-simple-filter-example",
10-
"shortDescription":"xxxxxxxxxxxxxxx",
10+
"shortDescription":"MATLAB/Simulink Model Example Using MPLAB Device Blocks on the hardware platform Curiosity Platform Development Board and dsPIC33AK128MC106 GP DIM",
1111
"simulationTool":{
1212
"name":"MATLAB/Simulink",
13-
"semverRange":">=2022"
13+
"semverRange":">=2024"
1414
},
1515
"addonPackages":[
1616
"MATLAB add on packages",
1717
"Simulink",
1818
"MPLAB Device blocks for Simulink",
19-
"Motor Control Blockset",
20-
"Embedded Coder",
21-
"Fixed-Point Designer"
19+
"Embedded Coder"
2220
],
2321
"compiler":{
24-
"name":"XC16",
25-
"semverRange":"^2.0.0"
22+
"name":"XCDSC",
23+
"semverRange":"^3.21"
2624
},
2725
"dfp":{
28-
"name":"xxxxxxxxxxxxxxx",
29-
"semverRange":">=x.x.x"
26+
"name":"dsPIC33AK-MC_DFP",
27+
"semverRange":">=1.1.109"
3028
},
3129
"device":{
3230
"metaDataVersion":"1.0.0",
3331
"category":"com.microchip.portal.contentRef",
3432
"content":{
3533
"metaDataVersion":"1.0.0",
3634
"category":"com.microchip.device",
37-
"name":"xxxxxxxxxxxxxxx",
35+
"name":"dsPIC33AK128MC106",
3836
"versionRange":"*"
3937
}
4038
},
4139
"keywords":[
42-
"GPIO",
43-
"UART"
40+
"GPIO",
41+
"UART",
42+
"ADC",
43+
"Filter",
44+
"MATLAB",
45+
"MATLAB Simulink",
46+
"Communication Module"
4447
]
4548
}
4649
}

README.md

Lines changed: 126 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,146 @@
11
<picture>
22
<source media="(prefers-color-scheme: dark)" srcset="images/microchip_logo_white_red.png">
3-
<source media="(prefers-color-scheme: light)" srcset="images/microchip_logo_black_red.png">
3+
<source media="(prefers-color-scheme: light)" srcset="images/microchip_logo_black_red.png">
44
<img alt="Microchip Logo." src="images/microchip_logo_black_red.png">
55
</picture>
66

7-
## matlab dspic33a curiosity simple filter example
7+
# MATLAB/Simulink Model Example Using MPLAB® Device Blocks for dsPIC33AK128MC106 Curiosity GP DIM
88

9-
Board Image if any.
9+
## 1. INTRODUCTION
1010

11-
## Summary
11+
This document describes the setup requirements for demonstrating the use of [MPLAB Device Blocks](https://in.mathworks.com/matlabcentral/fileexchange/71892-mplab-device-blocks-for-simulink-dspic-pic32-and-sam-mcu) to configure and operate the dsPIC Digital Signal Controller (DSC) and its peripherals within a MATLAB/Simulink model. The example is developed using the hardware platform
12+
[EV74H48A](https://www.microchip.com/en-us/development-tool/EV74H48A) "Curiosity Platform Development Board" and [EV02G02A](https://www.microchip.com/en-us/development-tool/EV02G02A) "dsPIC33AK128MC106 General Purpose Dual In-Line Module (DIM)"</p>
1213

14+
## 2. SUGGESTED DEMONSTRATION REQUIREMENTS
1315

14-
## Related Documentation
16+
### 2.1 MATLAB Model Required for the Demonstration
1517

18+
To clone or download this MATLAB model on GitHub,
1619

17-
## Software Used
20+
- MATLAB model can be cloned or downloaded as zip file from the Github repository ([link](https://github.com/microchip-pic-avr-solutions/matlab-dspic33a-curiosity-simple-filter-example)).
1821

22+
### 2.2 Software Tools Used for Testing the MATLAB/Simulink Model
1923

20-
## Hardware Used
24+
- MPLAB® X IDE **v6.25**
25+
- MPLAB® XC-DSC Compiler **v3.21**
26+
- MATLAB R2024b
27+
- Required MATLAB add-on packages
28+
- Simulink (v24.2)
29+
- Simulink Coder (v24.2)
30+
- MATLAB Coder (v24.2)
31+
- Embedded Coder (v24.2)
32+
- MPLAB Device blocks for Simulink (v3.62)
33+
34+
> **_NOTE:_**
35+
>The software tools used for testing the model during release is listed above. It is recommended to use the version listed above or later versions for building the model.
2136
37+
### 2.3 Hardware Tools Required for the Demonstration
2238

23-
## Setup
39+
- Curiosity Platform Development Board ([EV74H48A](https://www.microchip.com/en-us/development-tool/EV74H48A))
40+
- dsPIC33AK128MC106 General Purpose Dual In-Line Module ([EV02G02A](https://www.microchip.com/en-us/development-tool/EV02G02A))
2441

42+
## 3. HARDWARE SETUP
43+
This section describes the hardware setup required for the demonstration.
44+
> **Note:** </br>
45+
>In this document, hereinafter Curiosity Platform Development Board is referred as **development board**.
2546
26-
## Operation
47+
1. Insert the **dsPIC33AK128MC106 Curiosity GP DIM** into the DIM Interface **connector J1** on the development board. Make sure the DIM is placed correctly and oriented before going ahead.
2748

49+
<p align="left" >
50+
<img src="images/dimconnected.png"width="500"></p>
2851

52+
2. The development board has an onboard programmer **PICkit™ On Board (PKoBv4)** , which can be used for programming or debugging the microcontroller or dsPIC DSC on the DIM. To use the onboard programmer, connect a Micro-C® cable between the Host PC and **connector J24** on the development board.
2953

54+
The development board is also powered by this USB itself.
55+
56+
<p align="left">
57+
<img src="images/pkob4.png"width="500"></p>
58+
59+
## 4. BASIC DEMONSTRATION
60+
<p style='text-align: justify;'> Follow the below instructions step-by-step, to set up and run demo application:</p>
61+
62+
1. Launch MATLAB (refer the section [“2.2 Software Tools Used for Testing the MATLAB/Simulink Model"](#22-software-tools-used-for-testing-the-matlabsimulink-model)).</p>
63+
64+
2. Open the folder downloaded from the repository, in which MATLAB files are saved (refer the section ["2.1 MATLAB Model Required for the Demonstration"](#21-matlab-model-required-for-the-demonstration)).
65+
66+
<p align="left" >
67+
<img src="images/dem1.png"width="500"></p>
68+
69+
3. Double click on the example Simulink model - **Curiosity_33ak128mc106_Simple_Filter.slx**. This opens the Simulink model as shown below.
70+
71+
<p align="left">
72+
<img src="images/dem3.png"width="500"></p>
73+
</p>
74+
75+
> **Note:** </br>
76+
>This example illustrates how to configure the dsPIC DSC and its peripherals through code generation using MPLAB Device blocks. Simulation is not supported.
77+
78+
4. <p style='text-align: justify;'> This model uses the <b>External Mode</b> debug option for real time data visualization. To configure the external mode click on <b>"Ext Mode Settings" </b> option under the <b>“Microchip”</b> tab. <p style='text-align: justify;'> This will open <b>External Mode Setup</b> window and enable the checkboxes as shown in the figure. Also select the <b> COM port </b> connected to the development board and <b>Baud Rate</b>.
79+
80+
<p align="left">
81+
<img src="images/dem5.png"width="500"></p>
82+
</p>
83+
84+
> **Note:** </br>
85+
>The PKOB4 based USB-UART Channel is used in this example for USB-UART communication. The development board has a 2-port USB hub.
86+
87+
5. <p style='text-align: justify;'> To generate the code and run the model on hardware, click on <b>"Monitor & Tune" </b> option under the <b>Hardware</b> tab and ensure that <b>"Stop Time" </b> is set to <b>"inf"</b>.
88+
89+
<p align="left">
90+
<img src="images/dem6.png"width="500"></p>
91+
</p>
92+
6. <p style='text-align: justify;'> After compiling the code and programming the device, External Mode will be activated on the dsPIC DSC.
93+
94+
<p align="left">
95+
<img src="images/dem7.png"width="500"></p>
96+
97+
</p>
98+
7. <p style='text-align: justify;'> The <b> RGB LEB</b> will be glowing in green color and general purpose LEDs start blinking in a particular pattern.
99+
100+
<p align="left">
101+
<img src="images/led_rgb_green1.png"width="500"></p>
102+
</p>
103+
8. <p style='text-align: justify;'> Press the push button <b>S1</b>,to change the blinking pattern of general purpose LEDs.
104+
105+
<p align="left">
106+
<img src="images/led_rgb_green2.png"width="500"></p>
107+
</p>
108+
9. <p style='text-align: justify;'> Press the push button <b>S2</b>, and vary the potentiometer to change the rate of blinking.
109+
110+
<p align="left">
111+
<img src="images/led_rgb_green3.png"width="500"></p>
112+
</p>
113+
10. <p style='text-align: justify;'> To visualize the input and filtered output signals, double-click the Scope in the model to launch the scope view.The filter input is set to a 1Hz pulse by default.
114+
115+
116+
<p align="left">
117+
<img src="images/dem9.png"width="500"></p>
118+
</p>
119+
120+
11. Press the push button <b>S3</b>, the <b> RGB LEB</b> will be glowing in blue color and vary the potentiometer to change input signal and observe the filtered output signal in the scope view.
121+
122+
<p align="left">
123+
<img src="images/led_rgb_blue.png"width="500"></p>
124+
</p>
125+
126+
<p align="left">
127+
<img src="images/dem9_view.png"width="500"></p>
128+
</p>
129+
130+
12. <p style='text-align: justify;'>Click on the <b>Stop</b> button to stop the external mode.
131+
132+
<p align="left">
133+
<img src="images/dem10.png"width="500"></p>
134+
</p>
135+
136+
137+
## REFERENCES:
138+
For more information, refer to the following documents or links.
139+
1. Curiosity Platform Development Board User's Guide ([DS70005562](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU16/ProductDocuments/UserGuides/Curiosity-Platform-Development-Board-Users-Guide-DS70005562.pdf))
140+
2. dsPIC33AK128MC106 General Purpose Dual In-Line Module (DIM) Information Sheet ([DS70005556](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU16/ProductDocuments/InformationSheet/dsPIC33AK128MC106-General-Purpose-DIM-Info-Sheet-DS70005556.pdf))
141+
3. dsPIC33AK128MC106 Family datasheet ([DS70005539](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU16/ProductDocuments/DataSheets/dsPIC33AK128MC106-Family-Data-Sheet-DS70005539.pdf))
142+
4. MPLAB® X IDE User’s Guide ([DS50002027](https://ww1.microchip.com/downloads/en/DeviceDoc/50002027E.pdf) or [MPLAB® X IDE help](https://microchipdeveloper.com/xwiki/bin/view/software-tools/x/))
143+
5. [MPLAB® X IDE installation](http://microchipdeveloper.com/mplabx:installation)
144+
6. [MPLAB® XC-DSC Compiler installation](https://developerhelp.microchip.com/xwiki/bin/view/software-tools/xc-dsc/install/)
145+
7. [MPLAB Device Blocks for Simulink :dsPIC, PIC32 and SAM mcu](https://in.mathworks.com/matlabcentral/fileexchange/71892-mplab-device-blocks-for-simulink-dspic-pic32-and-sam-mcu)
146+
8. [External Mode Demo](https://www.microchip.com/en-us/about/media-center/videos/wuzLmORk1M0)

changelog.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
# matlab-dspic33a-curiosity-simple-filter-example v1.0.0
22
### Release Highlights
3-
4-
5-
6-
### Features Added\Updated
7-
8-
9-
3+
This is the first version of MATLAB/Simulink Model Example Using [MPLAB Device Blocks](https://in.mathworks.com/matlabcentral/fileexchange/71892-mplab-device-blocks-for-simulink-dspic-pic32-and-sam-mcu) on the hardware platform [EV74H48A](https://www.microchip.com/en-us/development-tool/EV74H48A) "Curiosity Platform Development Board" and [EV02G02A](https://www.microchip.com/en-us/development-tool/EV02G02A) "dsPIC33AK128MC106 General Purpose Dual In-Line Module (DIM)".

images/debug_led.png

698 KB
Loading

images/dem1.png

11.9 KB
Loading

images/dem10.png

41.4 KB
Loading

images/dem3.png

155 KB
Loading

images/dem4.png

44.9 KB
Loading

0 commit comments

Comments
 (0)