Skip to content

Commit 6fbb1f8

Browse files
i67977Jn-33
authored andcommitted
Pull request #17: Develop
Merge in MCU16CE/matlab-dspic33a-curiosity-i2cexample-mpu9250 from develop to main * commit 'cb5ba03b8ca2e126a31734fe7f671793d95dd0cb': minor read me modifiaction chnagelog and json files modified copied the project with commit (a9213d71000a999c726bbcf2cb93b900b8591e2f) on December 3, 2025 3:58:02 PM
2 parents 04a7168 + cb5ba03 commit 6fbb1f8

File tree

12 files changed

+27
-20
lines changed

12 files changed

+27
-20
lines changed

.main-meta/main.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"content":{
55
"metaDataVersion":"1.0.0",
66
"name":"com.microchip.matlab.project.matlab-dspic33a-curiosity-i2cexample-mpu9250",
7-
"version":"2.0.1",
7+
"version":"3.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 Example: Roll and Pitch Angles Esitimation using Curiosity Platform Development Board, dsPIC33AK128MC106 Curiosity GP DIM and MPU9250",
10+
"shortDescription":"MATLAB/Simulink Model for I2C Peripheral Example: Roll, Pitch and Yaw Angles Esitimation using Curiosity Platform Development Board, dsPIC33AK128MC106 Curiosity GP DIM and MPU9250",
1111
"simulationTool":{
1212
"name":"MATLAB/Simulink",
13-
"semverRange":">=2024"
13+
"semverRange":">=2025"
1414
},
1515
"addonPackages":[
1616
"MATLAB add on packages",

README.md

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

7-
# MATLAB/Simulink Model for I2C Peripheral Example: Roll and Pitch Angles Estimation using Curiosity Platform Development Board, dsPIC33AK128MC106 Curiosity GP DIM and MPU9250
7+
# MATLAB/Simulink Model for I2C Peripheral Example: Roll, Pitch and Yaw Angles Estimation 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 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.
14+
MPU-9250 is a multi-chip module (MCM) with 9-axis Motion Tracking device that combines a <b>3-axis gyroscope, 3-axis accelerometer, 3-axis magnetometer and a Digital Motion Processor™ (DMP)</b>. This example uses all the three sensors to estimate the roll, pitch and yaw angles.
1515

1616
## 2. SUGGESTED DEMONSTRATION REQUIREMENTS
1717

@@ -25,14 +25,15 @@ To clone or download this MATLAB model on GitHub,
2525

2626
- MPLAB® X IDE **v6.25**
2727
- MPLAB® XC-DSC Compiler **v3.21**
28-
- MATLAB R2024b
28+
- MATLAB R2025b
2929
- Required MATLAB add-on packages
30-
- Simulink (v24.2)
31-
- Simulink Coder (v24.2)
32-
- MATLAB Coder (v24.2)
33-
- Embedded Coder (v24.2)
30+
- Simulink (v25.2)
31+
- Simulink Coder (v25.2)
32+
- MATLAB Coder (v25.2)
33+
- Embedded Coder (v25.2)
3434
- MPLAB Device blocks for Simulink (v3.62)
35-
- Motor Control Blockset (v24.2)
35+
- Motor Control Blockset (v25.2)
36+
3637
> **_NOTE:_**
3738
>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.
3839
@@ -52,12 +53,12 @@ This section describes the hardware setup required for the demonstration.
5253
<p align="left" >
5354
<img src="images/dimconnected.png"width="500"></p>
5455

55-
2. Insert the **MPU 9DOF CLICK** into the **mikro BUS A** interface **connector J13** on the development board. Make sure the click board is inserted correctly before going ahead.
56+
2. Insert the **MPU 9DOF click** into the **mikro BUS A** interface **connector J13** on the development board. Make sure the click board is inserted correctly before going ahead.
5657

5758
<p align="left" >
5859
<img src="images/microbusA.png"width="500"></p>
5960

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.
61+
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.
6162

6263
The development board is also powered by this USB itself.
6364

@@ -74,14 +75,14 @@ This section describes the hardware setup required for the demonstration.
7475
<p align="left" >
7576
<img src="images/dem1.png"width="500"></p>
7677

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

7980
<p align="left">
8081
<img src="images/dem3.png"width="500"></p>
8182
</p>
8283

8384
> **Note:** </br>
84-
>This example demonstrates only the code generation to demonstrate the I2C communication. The simulation is not possible in this case.
85+
>This example demonstrates only the code generation to demostrate the I2C communication. The simulation is not possible in this case.
8586

8687
4. <p style='text-align: justify;'>From this Simulink model an MPLAB X project can be generated, and it can be used to run the I2C Communication using development board. <p style='text-align: justify;'>To generate the code from the Simulink model, go to the <b>"MICROCHIP"</b> tab, and enable the tabs shown in the figure below.
8788

@@ -108,19 +109,19 @@ This section describes the hardware setup required for the demonstration.
108109
<p align="left">
109110
<img src="images/dem7.png"width="500"></p>
110111

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

113114
<p align="left">
114115
<img src="images/debug_led.png"width="500"></p>
115116
</p>
116117

117-
9. <p style='text-align: justify;'> The <b> RGB LED</b> will be glowing in different colors. To increase the brightness of the RGB LED, vary the <b>Potentiometer</b> on the development board.
118+
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.
118119

119120
<p align="left">
120121
<img src="images/led_rgb.png"width="500"></p>
121122
</p>
122123

123-
10. <p style='text-align: justify;'> To visualize the estimated roll and pitch 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.
124+
10. <p style='text-align: justify;'> To visualize the estimated roll, pitch and yaw angles from the <b>accelerometer, gyroscope </b> and <b> magnetometer</b> sensors of <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 roll, pitch and yaw angles.
124125

125126
<p align="left">
126127
<img src="images/dem9.png"width="500"></p>
@@ -133,8 +134,7 @@ This section describes the hardware setup required for the demonstration.
133134
</p>
134135

135136
> **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-
137+
>At each startup, the system calibrates the **accelerometer, gyroscope** and **magnetometer** 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.
138138
139139
## REFERENCES:
140140
For more information, refer to the following documents or links.

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# matlab-dspic33a-curiosity-i2cexample-mpu9250 v3.0.0
2+
### Release Highlights
3+
This is the fourth version of MATLAB Simulink model for I2C Communication Demonstration on hardware platform Curiosity Platform Development Board, dsPIC33AK128MC106 Curiosity GP DIM, and MPU9250 for theEstimation of Roll, Pitch and Yaw Angles by integrating the Magnetometer.
4+
5+
## Features Added\Updated
6+
Yaw Angles are Estimated from Gyroscope and Magnetometer data.
7+
18
# matlab-dspic33a-curiosity-i2cexample-mpu9250 v2.0.1
29
### Release Highlights
310
This is the third version, which includes minor but necessary modifications to the readme file for the MATLAB/Simulink model for demonstrating I2C communication on the hardware platform consisting of the Curiosity Platform Development Board, dsPIC33AK128MC106 Curiosity GP DIM, and MPU9250, used for the estimation of roll and pitch angles.

images/dem1.png

-6.55 KB
Loading

images/dem3.png

-72.4 KB
Loading

images/dem4.png

-24 KB
Loading

images/dem5.png

-80.7 KB
Loading

images/dem7.png

-143 KB
Loading

images/dem9.png

69 KB
Loading
-163 KB
Binary file not shown.

0 commit comments

Comments
 (0)