3.2.6 Project Setup

  1. Create a New Project in MPLAB® X IDE.

  2. The Validation Hardware used with Microchip Bluetooth Data Mobile App is shown in the process below. AVR128DA48 8-bit devices are used for reference.
  3. Open MCC by clicking Tools → Embedded → MPLAB® Code Configurator OR click the MCC icon.

    or

  4. If MCC is not available; it is required to be installed. Navigate to Tools→ Plugins. Under Available Plugins select MPLAB® Code Configurator, ensure the checkbox is selected and press Install. Once this installation is completed, MCC will be available.
  5. On launching MCC click on Content Manager button.
    WARNING
    Kindly use mentioned Driver Version's only as shown in the below image
    1. Expand Libraries section and load the available version of rnbd-rn487x-host-driver BLE Library
      • Common for PIC & AVR
    2. Expand Drivers section and load the below version of UART Drivers
    3. Click on Apply Button to finish the Library and Driver Configurations:
  6. From the Device Resources panel under Libraries dropdown select: rnbd-rn487x BLE Module.

    Add the RNBD-RN487x from Device Resource to Project Resource as below

    Once RNBD-RN487x driver was loaded to the project resource choose USART0 as UART Hardware Dependency Selector in which GUI will be expanded for other configuration setting tab

    After the initial setup, Default RNBD-RN487x Configuration populate as below

  7. The Notifications [MCC] tab will appear after the library addition to describe required actions. The library requires the Reset Pin to be connected to the Module, which needs to be assigned to a pin. Select and configure the dependent UART instance under Dependency Selector.

  8. Generating Example Applications:
    • Enable Sample Examples toggle button ---> Under Reference Example drop Down choose any of the example application as listed below,
      • Basic Data Exchange
      • Transparent UART Application

        Note:Any one of the Examples can only be selected with is common for both RNBD and RN487x

  9. Clock Settings:
    • From the Project Resource panel under System select Clock Control
    • Set Internal Oscillator Frequency to 20 MHz system clock, Prescaler Enable option should be Enabled and Prescaler Divison should be set to 2x.

  10. UART Settings:
    • AVR
      • NOTE: The below UART selections are applicable for both Transparent UART Application and Basic Data Exchange (USART0 and USART1)

  11. Global Interrupt Settings:
    • Click on Interrupt Manager under System settings