Rapid prototyping with 32-bit MCU-based Curiosity Nano Evaluation Kit using MPLAB Harmony v3 Software Framework: Step 6

This demo application requires adding Click board functionality for the following three Click boards.
Click the links below to download the examples for the Click boards.

Note:

Step 6.1: Add Weather Click board routine

  • Unzip the downloaded ZIP file weather.zip.
  • From the unzipped folder weather/firmware/src, copy the folder click_routines to the folder firmware/src under your application project.
  • In the project explorer, right-click on folder Header File and add a subfolder click_routines by selecting Add Existing Items from Folders…
header_add.png
Figure 1
  • Click on the Add Folder… button.
header_add2.png
Figure 2
  • Select the click_routines folder and select Files of type: as Header Files.
header_add3.png
Figure 3
  • Click on the Add button to add the selected folder.
header_add4.png
Figure 4
  • The Weather Click example header files get added to your project.
weather_click_source.png
Figure 5
  • In the project explorer, right-click on folder Source Files and add a subfolder click_routines by selecting Add Existing Items from Folders….
source_add.png
Figure 6
  • Click on the Add Folder button.
source_add2.png
Figure 7
  • Select the click_routines folder and select Files of type: as Source Files.
source_add3.png
Figure 8
  • Click on the Add button to add the selected folder.
source_add4.png
Figure 9
  • The Weather Click example source files get added to your project.
weather_click_header.png
Figure 10

Step 6.2: Add Fan Click board routine

  • Unzip the downloaded ZIP file fan.zip.
  • From the unzipped folder fan/firmware/src/click_routines, copy the folder fan to the folder firmware/src/click_routines under your application project.
  • In the project explorer, right-click on folder Header Files/click_routines and add a subfolder fan by selecting Add Existing Items from Folders….
header_add.png
Figure 11
  • Click on the Add Folder… button.
header_add2.png
Figure 12
  • Select the fan folder and select Files of type: as Header Files.
fan_file_header_add.png
Figure 13
  • Click on the Add button to add the selected folder.
header_add4.png
Figure 14
  • The Fan Click example header files get added to your project.
fan_click_header.png
Figure 15
  • In the project explorer, right-click on folder Source Files/click_routines and add a subfolder fan by selecting Add Existing Items from Folders….
source_add.png
Figure 16
  • Click on the Add Folder… button.
source_add2.png
Figure 17
  • Select the fan folder and select Files of type: as Source Files.
fan_file_source_add.png
Figure 18
  • Click on the Add button to add the selected folder.
source_add4.png
Figure 19
  • The Fan Click example source files get added to your project.
fan_click_source.png
Figure 20

Step 6.3: Add eINK Bundle Click board routine

  • Unzip the downloaded ZIP file eink_bundle.zip.
  • From the unzipped folder fan/firmware/src/click_routines, copy the folder eink_bundle to the folder firmware/src/click_routines under your application project.
  • In the project explorer, right-click on folder Header Files/click_routines and add a subfolder eink_bundle by selecting Add Existing Items from Folders….
header_add.png
Figure 21
  • Click on the Add Folder… button.
header_add2.png
Figure 22
  • Select the eink_bundle folder and select Files of type: as Header Files.
eink_file_header_add.png
Figure 23
  • Click on the Add button to add the selected folder.
header_add4.png
Figure 24
  • The eink_bundle Click example header files get added to your project.
eink_click_header.png
Figure 25
  • In the project explorer, right-click on folder Source Files/click_routines and add a subfolder eink_bundle by selecting Add Existing Items from Folders….
source_add.png
Figure 26
  • Click on the Add Folder… button.
source_add2.png
Figure 27
  • Select the eink_bundle folder and select Files of type: as Source Files.
eink_file_source_add.png
Figure 28
  • Click on the Add button to add the selected folder.
source_add4.png
Figure 29
  • The eink_bundle Click example source files get added to your project.
eink_click_source.png
Figure 30

Note: You could remove the weather_example.c, fan_example.c, weather_example.h, fan_example.h, eink_bundle_example.c, and eink_bundle_example.h from the project by right click and select Remove from Project since these files are not used in this project. This would save some application memory space.

Step 6.4: Add ble source files

  • Unzip the downloaded ZIP file pic32cmmc_smart_appliance_control.zip
  • From the unzipped folder /pic32cmmc_smart_appliance_control/dev_files/pic32cm_mc00_cnano, copy the folder ble to the folder firmware/src/ under your application project
  • In the project explorer, right-click on folder Header Files and add a subfolder ble by selecting Add Existing Items from Folders….
header_add.png
Figure 31
  • Click on the Add Folder… button.
header_add2.png
Figure 32
  • Select the ble folder from src/ble and select Files of type: as Header Files.
ble_header3.png
Figure 33
  • Click on the Add button to add the selected folder.
header_add4.png
Figure 34
  • The ble example header files get added to your project.
ble_header.png
Figure 35
  • In the project explorer, right-click on folder Source Files and add a subfolder click_routines by selecting Add Existing Items from Folders….
source_add.png
Figure 36
  • Click on the Add Folder… button.
source_add2.png
Figure 37
  • Select the ble folder and select Files of type: as Source Files.
ble_source3.png
Figure 38
  • Click on the Add button to add the selected folder.
source_add4.png
Figure 39
  • The ble example source files get added to your project.
ble_source.png
Figure 40

Step 6.5: Map generic Macros of Click routines

  • Copy the Generic Macros used in the Fan Click and eINK bundle Click routines
  • From the unzipped folder fan/firmware/src/click_routines, open the file click_interface.h copy the Click routine interfaces/resources Macro Declarations as highlighted in Figure 41
macro4.png
Figure 41
  • And paste the click_interface.h in the folder firmware/src/click_routines under your application project.
macro5.png
Figure 42
  • From the unzipped folder eink_bundle/firmware/src/click_routines, open the file click_interface.h copy the Click routine interfaces resources Macro Declarations as highlighted in Figure 43
macro1.png
Figure 43
  • And paste in the click_interface.h in the folder firmware/src/click_routines under your application project
macro2.png
Figure 44
  • Map the generic macros used in the Weather Click, Fan Click, and eINK Click bundle routines to the Harmony PLIB APIs of the PIC32CM MC00 MCU based on where the Click boards are placed on the mikroBUS sockets on the Curiosity Nano Base for Click boards.

Fan Click API Mapping

  • In this demo, the Fan Click board is placed on the mikroBUS socket #2, which corresponds to the SERCOM0 I2C peripheral to communicate with the Click board. In the click_interface.h, map the generic Fan Click APIs to SERCOM0 as shown in Figure 45.
macro7.png
Figure 45

Weather Click routine API Mapping.

  • In this demo, the Weather Click board is placed on the mikroBUS socket #3, which corresponds to the SERCOM0 I2C peripheral to communicate with the Click board. In the click_interface.h, map the generic Weather APIs to SERCOM0 as shown in Figure 46.
macro6.png
Figure 46

eINK Bundle Click routine API Mapping

  • In this demo, the eINK Click board is placed on the mikroBUS socket #1, which corresponds to the SERCOM1 SPI peripheral to communicate with the Click board. In the click_interface.h, map the generic eINK Click APIs to SERCOM1 as shown in Figure 47.
macro3.png
Figure 47


Next Step >

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.