Incompatibility of the Curiosity Board with a PIC16F18345
The PIC16F18345 used on the Curiosity Board has two I²C peripherals. The pinouts for the two I²C modules are assigned by MPLAB® Code Configurator (MCC). The Curiosity Board connects one of the pins on the second I²C port to the external UART, rendering the second I²C port unusable.
MCC is not aware of the I²C-to-UART connection and will generate non-functional code for the second I²C. To use both of the I²C ports on the PIC® device, you must disconnect then properly wire the second I²C ports.