|
10 | 10 |
|
11 | 11 | # AVR128DB48 I2C_Host Example Component for CNano Explorer: I2C Proximity Sensor (Callbacks, DVRT) |
12 | 12 |
|
| 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 | +), 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 | +), is used here in the Callbacks implementation with the DV Run Time (DVRT) visualization. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +This example demonstrates how to read the value of the VCNL4200 proximity sensor on the Curiosity Nano Explorer, with the DV Run Time Visualization Output selected. Every 100 ms, an LED and a Debug I/O pin are toggled. Depending on the DVRT streaming tick setting (default is 100 ms), the appropriately formatted values of the variables added to the DVRT Streaming Table are sent to the [MPLAB® Data Visualizer](https://www.microchip.com/en-us/tools-resources/debug/mplab-data-visualizer "MPLAB® Data Visualizer"). |
| 20 | + |
| 21 | + |
| 22 | +## Operation |
| 23 | +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: |
| 24 | + |
13 | 25 | When running the application, using the MPLAB Data Visualizer, you should see something similar to the following: |
14 | 26 |  |
| 27 | +- [Data Visualizer Debug GPIO Setup](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=I2C.HOST.EX.DV.DEBUG.IO&version=latest&redirect=true) |
| 28 | +- [Data Visualizer Setup for DV Run Time](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=I2C.HOST.EX.DVRUNTIME.CONFIG&version=latest&redirect=true) |
| 29 | + |
| 30 | +## Setup |
15 | 31 |
|
16 | | -The following is the required MCC Melody Builder: |
17 | | - |
| 32 | +The following outlines the complete MPLAB Code Configuration (MCC) Melody configuration, including all the selected tasks implemented in this example. |
18 | 33 |
|
19 | 34 | The following is the required MCC Melody configuration: |
20 | 35 |  |
21 | | -<!-- This is where the introduction to the example goes, including mentioning the peripherals used --> |
22 | 36 |
|
23 | | -## Related Documentation |
| 37 | + |
24 | 38 |
|
25 | | -<!-- Any information about an application note or tech brief can be linked here. Use unbreakable links! |
26 | | - In addition a link to the device family landing page and relevant peripheral pages as well: |
27 | | - - [AN3381 - Brushless DC Fan Speed Control Using Temperature Input and Tachometer Feedback](https://microchip.com/00003381/) |
28 | | - - [PIC18F-Q10 Family Product Page](https://www.microchip.com/design-centers/8-bit/pic-mcus/device-selection/pic18f-q10-product-family) --> |
29 | 39 |
|
30 | | -## Software Used |
| 40 | +## MCC Melody Example Components |
| 41 | +Example Components integrate learning material directly into the MCC. This allows the 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. |
31 | 42 |
|
32 | | -<!-- All software used in this example must be listed here. Use unbreakable links! |
33 | | - - MPLAB® X IDE 5.30 or newer [(microchip.com/mplab/mplab-x-ide)](http://www.microchip.com/mplab/mplab-x-ide) |
34 | | - - MPLAB® XC8 2.10 or a newer compiler [(microchip.com/mplab/compilers)](http://www.microchip.com/mplab/compilers) |
35 | | - - MPLAB® Code Configurator (MCC) 3.95.0 or newer [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator) |
36 | | - - MPLAB® Code Configurator (MCC) Device Libraries PIC10 / PIC12 / PIC16 / PIC18 MCUs [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator) |
37 | | - - Microchip PIC18F-Q Series Device Support (1.4.109) or newer [(packs.download.microchip.com/)](https://packs.download.microchip.com/) --> |
38 | 43 |
|
39 | | -- MPLAB® X IDE 6.25.0 or newer [(MPLAB® X IDE 6.25)](https://www.microchip.com/en-us/development-tools-tools-and-software/mplab-x-ide) |
40 | | -- MPLAB® XC8 3.0.0 or newer compiler [(MPLAB® XC8 3.0)](https://www.microchip.com/en-us/tools-resources/develop/mplab-xc-compilers/xc8) |
| 44 | +## Related Documentation |
41 | 45 |
|
42 | | -## Hardware Used |
| 46 | +- [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") |
| 47 | +- [MCC Melody Design Patterns for Control Flow](https://onlinedocs.microchip.com/g/GUID-7CE1AEE9-2487-4E7B-B26B-93A577BA154E "MCC Melody Design Patterns for Control Flow") |
43 | 48 |
|
44 | | -<!-- All hardware used in this example must be listed here. Use unbreakable links! |
45 | | - - PIC18F47Q10 Curiosity Nano [(DM182029)](https://www.microchip.com/Developmenttools/ProductDetails/DM182029) |
46 | | - - Curiosity Nano Base for Click boards™ [(AC164162)](https://www.microchip.com/Developmenttools/ProductDetails/AC164162) |
47 | | - - POT Click board™ [(MIKROE-3402)](https://www.mikroe.com/pot-click) --> |
| 49 | +- [Curiosity Nano Explorer User Guide](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/UserGuides/CNANO-Explorer-UserGuide-DS50003716.pdf "Curiosity Nano Explorer Users Guide") |
48 | 50 |
|
49 | | -## Setup |
| 51 | +- [AVR128DB48 Data Sheet](https://ww1.microchip.com/downloads/en/DeviceDoc/AVR128DB28-32-48-64-DataSheet-DS40002247A.pdf "AVR128DB48 Data Sheet") |
50 | 52 |
|
51 | | -<!-- Explain how to connect hardware and set up software. Depending on complexity, step-by-step instructions and/or tables and/or images can be used --> |
| 53 | +## Software Used |
| 54 | +- [MPLAB® X IDE](https://www.microchip.com/en-us/development-tools-tools-and-software/mplab-x-ide) v6.25 or newer |
| 55 | +- [MPLAB® XC8](https://www.microchip.com/en-us/tools-resources/develop/mplab-xc-compilers/xc8) v3.00 or newer |
52 | 56 |
|
53 | | -## Operation |
| 57 | +- [MPLAB® Code Configurator](https://www.microchip.com/en-us/tools-resources/configure/mplab-code-configurator) (MCC) Plug-in Version v5.6.2 or newer (*Tools>Plugins>Installed*, search: "MCC") |
| 58 | +- [MPLAB® Data Visualizer](https://www.microchip.com/en-us/tools-resources/debug/mplab-data-visualizer) Plug-in Version v1.4.1926 or newer (*Tools>Plugins>Installed*, search: "Data Visualizer") |
| 59 | +- MCC Melody I2C_Host Example Component for the Curiosity Nano Explorer 1.0.0 or newer |
| 60 | +- MCC Core v5.8.2 or newer |
| 61 | +- Single Page Application (SPA) Host v1.0.0 or newer |
| 62 | +- MCC Melody Core v2.9.1 or newer |
54 | 63 |
|
55 | | -<!-- Explain how to operate the example. Depending on complexity, step-by-step instructions and/or tables and/or images can be used --> |
| 64 | +Open the MCC Content Manager  to verify the MCC Core and MCC Melody Core versions. |
56 | 65 |
|
57 | | -## Summary |
| 66 | + |
| 67 | + |
| 68 | +## Hardware Used |
| 69 | +- AVR128DB48 Curiosity Nano [(EV35L43A)](https://www.microchip.com/en-us/development-tool/EV35L43A) |
| 70 | +- Curiosity Nano Explorer [(EV58G97A)](https://www.microchip.com/en-us/development-tool/EV58G97A) |
58 | 71 |
|
59 | | -<!-- Summarize what the example has shown --> |
|
0 commit comments