Re: Writing to I2C EEPROM with MCC Support
Thank you for the link, but I believe the information is for the slave mode I2C.
For my application I need the master mode I2C.
Initially I tried several attempt by using the typical I2C2 code that was generated by MCC for PIC18F47K42 to write to an external I2C EEPROM 24LC024H with the code below but no success
i2c2_write1ByteRegister(uint8_t address, uint8_t reg, uint8_t data)
I contacted the tech support and they told me by using the I2C EEPROM code generate by MCC below will work
I2Cx_MasterWrite(I2C_EEPROM_T * eepromInstance, uint8_t *data, uint8_t size, uint8_t busAddress, ERR_STATUS_T *pstatus);
But once I generate the code, there were 2 error being generated by MCC on the i2c_eeprom_app.c which I have no idea how to correct, and because of the error I was not able to compile the code.