Skip to content

Commit 62ae4d5

Browse files
i67977Jn-33
authored andcommitted
Pull request #9: Develop
Merge in MCU16CE/matlab-dspic33a-curiosity-i2cexample-mpu9250 from develop to main * commit '9355ba188142eebc50322f9f912e85ba48685930': readme modification changelog modified, radme modified, one image changed and readme pdf added Update the files- main.json and changelog.md and deleted curiosity_i2c (37955a0af338bf5b6457d580dd816208dafa7278) on Friday, November 7, 2025 4:01:34 PM
2 parents 7f7a608 + 9355ba1 commit 62ae4d5

File tree

10 files changed

+27
-16
lines changed

10 files changed

+27
-16
lines changed

.main-meta/main.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"content":{
55
"metaDataVersion":"1.0.0",
66
"name":"com.microchip.matlab.project.matlab-dspic33a-curiosity-i2cexample-mpu9250",
7-
"version":"1.0.0",
7+
"version":"2.0.0",
88
"displayName":"MATLAB/Simulink Model for I2C Peripheral Demonstration on dsPIC33AK128MC106",
99
"projectName":"matlab-dspic33a-curiosity-i2cexample-mpu9250",
10-
"shortDescription":"MATLAB/Simulink Model for I2C Peripheral Demonstration on the hardware platform Curiosity Platform Development Board, dsPIC33AK128MC106 GP DIM and MPU9250 sensor on the MPU 9DOF Click Board",
10+
"shortDescription":"MATLAB/Simulink Model for I2C Peripheral Example: Roll and Pitch Angles Esitimation using Curiosity Platform Development Board, dsPIC33AK128MC106 Curiosity GP DIM and MPU9250",
1111
"simulationTool":{
1212
"name":"MATLAB/Simulink",
1313
"semverRange":">=2024"
@@ -24,7 +24,7 @@
2424
},
2525
"dfp":{
2626
"name":"dsPIC33AK-MC_DFP",
27-
"semverRange":">=1.1.109"
27+
"semverRange":">=1.2.125"
2828
},
2929
"device":{
3030
"metaDataVersion":"1.0.0",

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
<img alt="Microchip Logo." src="images/microchip_logo_black_red.png">
55
</picture>
66

7-
# MATLAB/Simulink Model for I2C Peripheral Example: Curiosity Platform Development Board, dsPIC33AK128MC106 Curiosity GP DIM and MPU9250
7+
# MATLAB/Simulink Model for I2C Peripheral Example: Roll and Pitch Angles Esitimation using Curiosity Platform Development Board, dsPIC33AK128MC106 Curiosity GP DIM and MPU9250
88

99
## 1. INTRODUCTION
1010

1111
This document describes the setup requirements for demonstration of I2C communication on the hardware platform
1212
[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)" using MPU9250 sensor on the MPU 9DOF Click Board.</p>
1313

14-
MPU-9250 is a multi-chip module (MCM) with 9-axis MotionTracking device that combines a 3-axis gyroscope, 3-axis accelerometer, 3-axis magnetometer and a Digital Motion Processor™ (DMP).
14+
MPU-9250 is a multi-chip module (MCM) with 9-axis Motion Tracking device that combines a 3-axis gyroscope, 3-axis accelerometer, 3-axis magnetometer and a Digital Motion Processor™ (DMP). This example exclusively uses 3-axis gyroscope, and the 3-axis accelerometer to estimate the roll and pitch angles.
1515

1616
## 2. SUGGESTED DEMONSTRATION REQUIREMENTS
1717

1818
### 2.1 MATLAB Model Required for the Demonstration
1919

2020
To clone or download this MATLAB model on GitHub,
2121

22-
- 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-i2cexample-mpu9250)).
22+
- MATLAB model can be cloned or downloaded as zip file from the Github repository ([link](https://github.com/microchip-pic-avr-examples/matlab-dspic33a-curiosity-i2cexample-mpu9250)).
2323

2424
### 2.2 Software Tools Used for Testing the MATLAB/Simulink Model
2525

@@ -31,8 +31,8 @@ To clone or download this MATLAB model on GitHub,
3131
- Simulink Coder (v24.2)
3232
- MATLAB Coder (v24.2)
3333
- Embedded Coder (v24.2)
34-
- MPLAB Device blocks for Simulink (v3.59)
35-
- Motor Control Blockset (v24.2)
34+
- MPLAB Device blocks for Simulink (v3.62)
35+
- Motor Control Blockset (v24.2)
3636
> **_NOTE:_**
3737
>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.
3838
@@ -57,7 +57,7 @@ This section describes the hardware setup required for the demonstration.
5757
<p align="left" >
5858
<img src="images/microbusA.png"width="500"></p>
5959

60-
3. 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-USB cable between the Host PC and **connector J24** on the development board.
60+
3. 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.
6161

6262
The development board is also powered by this USB itself.
6363

@@ -74,7 +74,7 @@ This section describes the hardware setup required for the demonstration.
7474
<p align="left" >
7575
<img src="images/dem1.png"width="500"></p>
7676

77-
3. Double click on the I2C example Simulink model - **curiosity_i2c.slx**. This opens the Simulink model as shown below.
77+
3. Double click on the I2C example Simulink model - **curiosity_i2c_pitch_roll.slx**. This opens the Simulink model as shown below.
7878

7979
<p align="left">
8080
<img src="images/dem3.png"width="500"></p>
@@ -96,42 +96,45 @@ This section describes the hardware setup required for the demonstration.
9696
</p>
9797

9898
> **Note:** </br>
99-
>Two COM ports are available on the development board. Select the second COM port number for the external mode (if COM2 and COM3 are available on the development board, select COM3).
99+
>The PKOB4 based USB-UART Channel is used in this example for USB-UART communication. The development board has a 2-port USB hub.
100100
101101
6. <p style='text-align: justify;'> To generate the code and run the I2C communication 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>.
102102

103103
<p align="left">
104104
<img src="images/dem6.png"width="500"></p>
105105
</p>
106-
7. <p style='text-align: justify;'> After compilation and programming the device. The external mode will be running on the dsPIC.
106+
7. <p style='text-align: justify;'> After compiling the code and programming the device, External Mode will be activated on the dsPIC DSC.
107107

108108
<p align="left">
109109
<img src="images/dem7.png"width="500"></p>
110110

111-
</p><p style='text-align: justify;'> The <b>General Purpose LED's</b> will be blinking.
111+
8. </p><p style='text-align: justify;'> The <b>General Purpose LED's</b> will be blinking.
112112

113113
<p align="left">
114114
<img src="images/debug_led.png"width="500"></p>
115115
</p>
116116

117-
8. <p style='text-align: justify;'> The <b> RGB LEB</b> will be glowing in different colors. To increase the brightness of the RGB LED, vary the <b>Potentiometer</b> on the development board.
117+
9. <p style='text-align: justify;'> The <b> RGB LEB</b> will be glowing in different colors. To increase the brightness of the RGB LED, vary the <b>Potentiometer</b> on the development board.
118118

119119
<p align="left">
120120
<img src="images/led_rgb.png"width="500"></p>
121121
</p>
122122

123-
9. <p style='text-align: justify;'> To view the I2C communication from <b>"MPU9250" </b> double click on the scope. This opens the scope view. Tilt or turn the development board by hand to view variations in the signal from the <b>accelerometer, gyroscope and magnetometer sensors of MPU9250</b>.
123+
10. <p style='text-align: justify;'> To visualize the estimated roll and ptch angles from the <b>accelerometer, gyroscope sensors of MPU9250</b> double click on the scope. This opens the scope view. Tilt or turn the development board by hand to view variations in the roll and pitch angles.
124124

125125
<p align="left">
126126
<img src="images/dem9.png"width="500"></p>
127127
</p>
128128

129-
10. <p style='text-align: justify;'>Click on the <b>Stop</b> button to stop the I2C communication and external mode.
129+
11. <p style='text-align: justify;'>Click on the <b>Stop</b> button to stop the I2C communication and external mode.
130130

131131
<p align="left">
132132
<img src="images/dem10.png"width="500"></p>
133133
</p>
134134

135+
> **Note:** </br>
136+
>At each startup, the system calibrates the accelerometer and gyroscope of the **MPU 9DOF Click board**. During this 2-second calibration period, the **development board** and **MPU 9DOF Click board** must remain stationary (do not move/ shake). After calibration, the board can be tilted or rotated to observe angle variations.
137+
135138

136139
## REFERENCES:
137140
For more information, refer to the following documents or links.

changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# matlab-dspic33a-curiosity-i2cexample-mpu9250 v2.0.0
2+
### Release Highlights
3+
This is the second version of MATLAB Simulink model for I2C Communication Demonstration on hardware platform Curiosity Platform Development Board, dsPIC33AK128MC106 Curiosity GP DIM, and MPU9250 for the Estimation of Roll and Pitch Angles.
4+
5+
6+
### Features Added\Updated
7+
Roll and Pitch Angles are Estimated from Gyroscope and Accelerometer data.
8+
19
# matlab-dspic33a-curiosity-i2cexample-mpu9250 v1.0.0
210
### Release Highlights
311
This is the first version of MATLAB Simulink model for I2C Communication Demonstration on hardware platform Curiosity Platform Development Board, dsPIC33AK128MC106 Curiosity GP DIM and MPU9250.

images/dem1.png

1.38 KB
Loading

images/dem3.png

-2.97 KB
Loading

images/dem7.png

143 KB
Loading

images/dem9.png

-77.9 KB
Loading

project/curiosity_i2c.slx

-118 KB
Binary file not shown.
163 KB
Binary file not shown.

project/docs/README.pdf

26.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)