Link Search Menu Expand Document

                                                                                                     

Getting Started with Harmony v3 Peripheral Libraries on PIC32MK GP MCUs

This tutorial shows you how to use the MPLAB Code Configurator (MCC) to create an application that will help you get started in developing applications on PIC32MK GP MCUs using MPLAB Harmony v3 Software Framework.

The application makes use of a PIC32MK General Purpose (GP) Development board and a MikroElectronika Weather click board (sold separately).

The application reads the current room temperature from the temperature sensor on the MikroElectronika Weather click board. The temperature reading is displayed on a serial console periodically every 500 milliseconds. The periodicity of the temperature values displayed on the serial console is changed to one second, two seconds, four seconds, and back to 500 milliseconds every time you press the switch S1 on the PIC32MK GP Development Board. Also, an LED (LED1) is toggled every time the temperature is displayed on the serial console.

The application you create will utilize:

  • The Serial Peripheral Interface (SPI) Peripheral Library (PLIB) to read the temperature from a temperature sensor.
  • The TMR2 PLIB to periodically sample temperature sensor data.
  • The CORE TIMER PLIB to use a blocking timer delay for initializing the temperature sensor.
  • The Universal Asynchronous Receiver Transmitter (UART) and Direct Memory Access (DMA) PLIBs to print the temperature values on a COM (serial) port terminal application running on a PC.
  • The General Purpose Input/Output (GPIO) PLIB to change the periodicity of temperature sensor data readings using the SWITCH press event and to toggle the LED.

For more information refer the links below.

               



Copyright © 2020 Microchip Technology.