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 printf error handling, sends values to MPLAB Data Visualizer every 250 ms. Uses Timer driver callbacks for sampling frequency.",
Copy file name to clipboardExpand all lines: README.md
+43-26Lines changed: 43 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,42 +10,59 @@
10
10
11
11
# Update the title for pic18f57q43-i2c-proximity-sensor-callbacks-printf-errors here
12
12
13
-
<!-- This is where the introduction to the example goes, including mentioning the peripherals used -->
13
+
The [I<sup>2</sup>C Proximity Sensor Example](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=I2C.HOST.EX.RUNNING.I2C.HOST.FIND.CLIENTS&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 Printf with error handling visualization.
14
16
15
-
## Related Documentation
16
-
17
-
<!-- Any information about an application note or tech brief can be linked here. Use unbreakable links!
18
-
In addition a link to the device family landing page and relevant peripheral pages as well:
19
-
- [AN3381 - Brushless DC Fan Speed Control Using Temperature Input and Tachometer Feedback](https://microchip.com/00003381/)
20
-
- [PIC18F-Q10 Family Product Page](https://www.microchip.com/design-centers/8-bit/pic-mcus/device-selection/pic18f-q10-product-family) -->
- Microchip PIC18F-Q Series Device Support (1.4.109) or newer [(packs.download.microchip.com/)](https://packs.download.microchip.com/) -->
20
+
This example reads the value of the VCNL4200 proximity sensor on the Curiosity Nano Explorer, using the Printf with error handling visualization output. Every 250 ms, an LED and a Debug I/O pin are toggled. An appropriately formatted Printf string is then sent to the [MPLAB® Data Visualizer](https://www.microchip.com/en-us/tools-resources/debug/mplab-data-visualizer"MPLAB® Data Visualizer").
30
21
31
-
- 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)
32
-
-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)
22
+
## Operation
23
+
The below image of the MPLAB Data Visualizer shows the application running, where proximityValue is displayed in a Printf string. Any I<sup>2</sup>C errors would also be displayed.
33
24
34
-
## Hardware Used
25
+
When running the application using the MPLAB Data Visualizer, you should see something similar to the following:
35
26
36
-
<!-- All hardware used in this example must be listed here. Use unbreakable links!
<!-- 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 -->
31
+
The following outlines the complete MPLAB Code Configuration (MCC) Melody configuration, including all the selected tasks implemented in this example.
<!-- Explain how to operate the example. Depending on complexity, step-by-step instructions and/or tables and/or images can be used -->
38
+
## MCC Melody Example Components
39
+
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.
48
40
49
-
## Summary
50
41
51
-
<!-- Summarize what the example has shown -->
42
+
## Related Documentation
43
+
44
+
-[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")
45
+
-[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")
46
+
47
+
-[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
+
49
+
-[PIC18F57Q43 Data Sheet](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/DataSheets/PIC18F27-47-57Q43-Data-Sheet-40002147F.pdf"PIC18F57Q43 Data Sheet")
50
+
51
+
## Software Used
52
+
-[MPLAB® X IDE](https://www.microchip.com/en-us/development-tools-tools-and-software/mplab-x-ide) v6.25 or newer
53
+
-[MPLAB® XC8](https://www.microchip.com/en-us/tools-resources/develop/mplab-xc-compilers/xc8) v3.00 or newer
0 commit comments