Step 4: With MHC, Configure I2C Driver, PLIB, Pins and Harmony Core
Add the I2C module under Available Components > Harmony > Drivers > I2C.
Accept the Core module auto-activation prompt. Since we will not use FreeRTOS in Lab 1, defer enabling this component for now. Once you are done, the module will be visible in the Project Graph pane.
I2C Driver and Core Component are now part of the Project Graph. The PLIB Used field will be auto-populated when I2C peripheral library is connected.
Connect I2C Driver with I2C1 peripheral library.
Right-click on the red diamond next to DRV_I2 to bring up a list of Satisfiers that can be used to attach to this component. Select the I2C1 peripheral library.
Select I2C1 peripheral library and keep the default configuration.
Configure Pins for I2C1 peripheral library.
Open the Pin Configuration pane by navigating to MHC > Tools > Pin Configuration.
Select the Pin Table tab and scroll down to the I2C1 module as shown below.
Enable I2C Data (I2C_SDA) on RA5 (pin #B15)
Enable I2C Clock (I2C_SCL) on RA4 (pin #A16)
Go back to the Project Graph.
This completes the configurations of the I2C Driver, I2C1 peripheral library, and the Core component. The application code will use the I2C Driver APIs to read the value from the temperature sensor.