|
9 | 9 | </a> |
10 | 10 |
|
11 | 11 | # AVR128DB48 I2C_Host Example Component for CNano Explorer: Find all I2C Clients on Bus (Callbacks, Printf-errors) |
12 | | -The following is the output, when Printf is selected as the Visualization Output. |
13 | 12 |
|
14 | | - |
| 13 | +The [I<sup>2</sup>C Host Find all Clients 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. |
15 | 16 |
|
16 | | -Full confgiguration. |
17 | | - |
| 17 | + |
18 | 18 |
|
19 | | -The same configuration, when Printf with error handling is selected, generates the following output: |
| 19 | + |
| 20 | +In this example, an I<sup>2</sup>C write is attempted for all possible I<sup>2</sup>C client addresses to identify clients that respond with an ACK. This builds up a list of valid I2C_Client addresses on the bus, displaying this as a printf message over the Universal Asynchronous Receiver and Transmitter (UART). The example uses a polled implementation. |
| 21 | + |
| 22 | +As each address is attempted in the Prinft with Error Checking visualization output, an Acknowledge (ACK) or No-Acknowledge (NACK) message is printed over the UART. |
| 23 | + |
| 24 | +When using the [MPLAB® Data Visualizer](https://www.microchip.com/en-us/tools-resources/debug/mplab-data-visualizer "MPLAB® Data Visualizer"), after configuring the Terminal to a baudrate of 115200 and clicking to 'display as text in the terminal' the example will look as shown below. |
| 25 | + |
| 26 | +The below image of the MPLAB Data Visualizer shows the application running on the Curiosity Nano Explorer board, where ten client devices have been found: |
20 | 27 |
|
21 | 28 |  |
22 | 29 |
|
23 | | -<!-- This is where the introduction to the example goes, including mentioning the peripherals used --> |
| 30 | +## Setup |
24 | 31 |
|
25 | | -## Related Documentation |
| 32 | +The following outlines the complete MCC Melody configuration, including all the selected tasks that have been implemented in this example, as seen in the MPLAB Code Configurator (MCC) Melody Builder. |
26 | 33 |
|
27 | | -<!-- Any information about an application note or tech brief can be linked here. Use unbreakable links! |
28 | | - In addition a link to the device family landing page and relevant peripheral pages as well: |
29 | | - - [AN3381 - Brushless DC Fan Speed Control Using Temperature Input and Tachometer Feedback](https://microchip.com/00003381/) |
30 | | - - [PIC18F-Q10 Family Product Page](https://www.microchip.com/design-centers/8-bit/pic-mcus/device-selection/pic18f-q10-product-family) --> |
| 34 | + |
31 | 35 |
|
32 | | -## Software Used |
33 | 36 |
|
34 | | -<!-- All software used in this example must be listed here. Use unbreakable links! |
35 | | - - MPLAB® X IDE 5.30 or newer [(microchip.com/mplab/mplab-x-ide)](http://www.microchip.com/mplab/mplab-x-ide) |
36 | | - - MPLAB® XC8 2.10 or a newer compiler [(microchip.com/mplab/compilers)](http://www.microchip.com/mplab/compilers) |
37 | | - - MPLAB® Code Configurator (MCC) 3.95.0 or newer [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator) |
38 | | - - 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) |
39 | | - - Microchip PIC18F-Q Series Device Support (1.4.109) or newer [(packs.download.microchip.com/)](https://packs.download.microchip.com/) --> |
40 | 37 |
|
41 | | -- 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) |
42 | | -- 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) |
| 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. |
43 | 40 |
|
44 | | -## Hardware Used |
45 | 41 |
|
46 | | -<!-- All hardware used in this example must be listed here. Use unbreakable links! |
47 | | - - PIC18F47Q10 Curiosity Nano [(DM182029)](https://www.microchip.com/Developmenttools/ProductDetails/DM182029) |
48 | | - - Curiosity Nano Base for Click boards™ [(AC164162)](https://www.microchip.com/Developmenttools/ProductDetails/AC164162) |
49 | | - - POT Click board™ [(MIKROE-3402)](https://www.mikroe.com/pot-click) --> |
| 42 | +## Related Documentation |
50 | 43 |
|
51 | | -## Setup |
| 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") |
52 | 46 |
|
53 | | -<!-- 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 --> |
| 47 | +- [Curiosity Nano Explorer User Guide](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/UserGuides/AVR128DB48-Curiosity-Nano-HW-UserGuide-DS40002186B.pdf "Curiosity Nano Explorer Users Guide") |
54 | 48 |
|
55 | | -## Operation |
| 49 | +- [AVR128DB48 Data Sheet](https://ww1.microchip.com/downloads/en/DeviceDoc/AVR128DB28-32-48-64-DataSheet-DS40002247A.pdf "AVR128DB48 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 |
56 | 54 |
|
57 | | -<!-- Explain how to operate the example. Depending on complexity, step-by-step instructions and/or tables and/or images can be used --> |
| 55 | +- [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") |
| 56 | +- [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") |
| 57 | +- MCC Melody I2C_Host Example Component for the Curiosity Nano Explorer 1.0.0 or newer |
| 58 | +- MCC Core v5.8.2 or newer |
| 59 | +- Single Page Application (SPA) Host v1.0.0 or newer |
| 60 | +- MCC Melody Core v2.9.1 or newer |
58 | 61 |
|
59 | | -## Summary |
| 62 | +Open the MCC Content Manager  to verify the MCC Core and MCC Melody Core versions. |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +## Hardware Used |
| 67 | +- AVR128DB48 Curiosity Nano [(EV35L43A)](https://www.microchip.com/en-us/development-tool/EV35L43A) |
| 68 | +- Curiosity Nano Explorer [(EV58G97A)](https://www.microchip.com/en-us/development-tool/EV58G97A) |
60 | 69 |
|
61 | | -<!-- Summarize what the example has shown --> |
|
0 commit comments