You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-25Lines changed: 23 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@
8
8
9
9
# MCC Melody ADC Data Streamer Example - Callbacks Implementation (PIC18F57Q43)
10
10
11
-
The [ADC Data Streamer example](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=MCC.MELODY.EXAMPLES.RUNNING.ADCC.DATA.STREAMER&version=latest&redirect=true"Analog-to-Digital Conversion (ADC) Data Streamer example"), of the MCC Melody ADCC Example Component, is used in the Callbacks Implementation. Displays ADCC samples visualized with the Data Streamer. An ADC conversion is taken every 100 ms on the selected analog channel, also toggling a LED and Debug GPIO.
11
+
The [ADC Data Streamer example](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=MCC.MELODY.EXAMPLES.RUNNING.ADCC.DATA.STREAMER&version=latest&redirect=true"Analog-to-Digital Conversion (ADC) Data Streamer example"), of the MCC Melody ADCC Example Component, is used in the Callbacks implementation and displays ADCC samples visualized with the Data Streamer. An Analog-to-Digital Conversion measurement is taken every 100 ms on the selected analog channel, also toggling an LED and Debug GPIO.
12
12
13
13
## MCC Melody Example Components
14
14
Example Components are a tight integration of learning material directly into MCC. This allows users to conveniently place configuration instructions side-by-side to the components they are configuring. For more information, refer to the [MCC Melody Example Components Introduction](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=MCC.MELODY.EXAMPLES&version=latest&redirect=true).
15
15
16
-
**Note:** The image below shows the ADCC Example Component, as it would be moving to the ADCC Data Streamer (Callbacks Implementation), having implemented the ADCC Basic Printf (Callbacks Implementation). In this case a diff between the two examples is shown.
16
+
**Note:** The image below shows the ADCC Example Component, as it would be moving to the ADCC Data Streamer, having implemented the ADCC Basic Printf, both of which are part of the Callbacks implementation. In this case. a diff between the two examples is shown.
17
17
18
18

19
19
@@ -48,7 +48,7 @@ All instructions required to recreate this example are listed below, under Confi
Once you have loaded the project in MPLAB X IDE, you will also be able to find more information from Tooltips and links next to the instructions
51
+
Once the project is loaded in MPLAB X IDE, the user will be able to find more information from Tooltips and links next to the instructions
52
52
[](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=MCC.MELODY.CONFIGHELP.UART.CNANO&version=latest&redirect=true).
53
53
54
54
@@ -57,44 +57,42 @@ Once you have loaded the project in MPLAB X IDE, you will also be able to find m
57
57
58
58
## Operation
59
59
The image below shows the [ADCC Basic Printf example](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=MCC.MELODY.EXAMPLES.RUNNING.ADCC.PRINTF&version=latest&redirect=true
60
-
) running, using the MPLAB Data Visualizer.
60
+
) running, using the MPLAB Data Visualizer.
61
+
62
+

63
+
64
+
## Data Visualizer Configuration
61
65
62
66
1) Click the  icon to open the MPLAB Data Visualizer.
63
-
2) Under the *Variable Streamers* tab (on the lefthand side), click the  button, to import a *.ds* file.
64
-
3) From your project root, navigate into *mmc_generated_files/data_streamer/* directory.
65
-
4) Click on the *data_streamer.ds* file to select it.
66
-
5) Then click the  button, to load the ds file.
67
+
2) Under the **Variable Streamers** tab (on the left-hand side), click the  button, to import a `.ds` file.
68
+
3) From your project root, navigate into `mcc_generated_files/data_streamer/` directory.
69
+
4) Click the `data_streamer.ds` file to select it.
70
+
5) Then click the  button to load the ds file.
67
71
68
-

72
+

69
73
70
-
You should see a *data_streamer Properties* window, showing the *adcResult* and *adcSampleCount* variables loaded.
74
+
The data_streamer Properties window will open up, displaying the loaded adcResult and adcSampleCount variables.
71
75
72
-
1) Click the  button, to load this data streamer configuration.
76
+
1) Click the  button to load this data streamer configuration.
2) Under Debug GPIO, click the  icon, to add to the time plot.
91
+
1) Click the **Connections** button.
92
+
2) Under Debug GPIO, click the  icon to add to the time plot.
89
93
90
94

91
95
92
-
If all is correct, when changing the pot meter value, you should see similar results to the below image.
93
-
94
-

95
-
96
-
97
-
## Summary
98
96
For more example components, open the stand-alone Content Manager  in MCC.
Copy file name to clipboardExpand all lines: pic18f57q43-adcc-data-streamer-callbacks-mcc.X/main.c
+19-2Lines changed: 19 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -38,8 +38,11 @@
38
38
staticvoidADCC_ConversionDone_Callback(void);
39
39
staticvoidTimer_Callback_100ms(void);
40
40
41
-
staticconststructTMR_INTERFACE*Timer=&Timer2; // TODO: Replace TimerX with name of const struct TMR_INTERFACE, from MCC Generated Files > timer > tmrx.c
41
+
staticconststructTMR_INTERFACE*Timer_dsFrame=&Timer_ds; // TODO: Replace TimerX with name of const struct TMR_INTERFACE, from MCC Generated Files > timer > tmrx.c
0 commit comments