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
"shortDescription": "Reads proximity sensor value. With Data Streamer output, sends values to MPLAB Data Visualizer via protocol every 100 ms. Uses Timer driver callbacks for sampling frequency.",
Copy file name to clipboardExpand all lines: README.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,22 +8,24 @@
8
8
</picture>
9
9
</a>
10
10
11
-
# AVR128DB48 I<sup>2</sup>C_Host Example Component for CNano Explorer: I<sup>2</sup>C Proximity Sensor (Callbacks, Data Streamer)
11
+
# AVR128DB48 I2C_Host Example Component for CNano Explorer: I<sup>2</sup>C Proximity Sensor (Callbacks, Data Streamer)
12
12
13
13
The [I<sup>2</sup>C Proximity Sensor example](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=I2C.HOST.EX.RUNNING.I2C.HOST.PROXIMITY.SENSOR&version=latest&redirect=true "I2C Proximity Sensor example"
14
14
), of the [MCC Melody I<sup>2</sup>C Example Component (for the Curiosity Nano Explorer)](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=I2C.HOST.EXAMPLE.COMPONENT&version=latest&redirect=true "MCC Melody I<sup>2</sup>C Example Component for the Curiosity Nano Explorer"
15
15
), is used here in the Polled implementation with the Data Streamer visualization.
This example demonstrates how to read the value of the VCNL4200 proximity sensor on the Curiosity Nano Explorer, with the Data Streamer Visualization Output selected. Every 100 ms, an LED and a Debug I/O pin are toggled every 100 ms and a Data Streamer frame is sent to the [MPLAB® Data Visualizer](https://www.microchip.com/en-us/tools-resources/debug/mplab-data-visualizer"MPLAB® Data Visualizer").
18
20
19
-
This example demonstrates how to read the value of the VCNL4200 proximity sensor on the Curiosity Nano Explorer, with the Data Streamer Visualization Output selected. Every 100 ms, an LED and a Debug I/O pin are toggled. A Timer overflow callback is used to send a Data Streamer frame every 100 ms.
20
21
21
22
## Operation
22
23
In the MCC Melody Data Streamer library configuration, the appropriately typed variables are added to the Data Streamer table.
The below image of the MPLAB Data Visualizer shows the application running, where proximityValue and framecount have been added to the DVRT Streaming Table and Time Plot:
**Note:** An individual Data Streamer Frame is highlighted in red at the bottom of the image in the hex terminal output. The frame can be identified by the StartByte of 0x03 and the EndByte of 0xFC.
@@ -32,9 +34,9 @@ The below image of the MPLAB Data Visualizer shows the application running, wher
32
34
## Setup
33
35
The image below outlines the complete MPLAB Code Configurator (MCC) Melody configuration, including all the selected tasks implemented in this example, as seen in the [MCC Melody Builder](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=MCC.MELODY.BUILDER&version=latest&redirect=true"MCC Melody Builder").
Example Components are a tight integration of learning material directly into MCC. This allows users to conveniently place the configuration instructions side-by-side to the components they are configuring. For more information, refer to the [MCC Melody Example Components](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=MCC.MELODY.EXAMPLES&version=latest&redirect=true) introduction.
@@ -68,3 +70,4 @@ Open the MCC Content Manager  to verify th
0 commit comments