Configure the I2C pins in MCC & initialize the I2C
peripherals using PLIB APIs & set the clock frequency.
IODIRClear(I2C1_SDA_PIN);
//set SDA as input
IODIRClear(I2C1_SCK_PIN); //set SCK as input
I2C1_Init();
I2C1_Start();
I2C1_MasterWrite(slaveAddress);
Use MCC to generate the I2C...