You can download my project files from here.
Here's the block diagram.
The register, created on memory, stores 128 of 8-bit values. I2C master can read/write the registers via I2C bus.
You may manipulate the registers via terminal (Virtual COM port on USB-UART) using commands regr and regw. When the command is executed successfully, the message "OK" is returned.
regr [register address]Also, you may use I2C master using command i2cr and i2cw.
regw [register address] [value to be written]
i2cr [slave address] [register address]Default slave address in my code is 0x0c. When the command is executed successfully, the message "OK" is returned.
i2cw [slave address] [register address] [value to be written]
This is an sample operation with I2C1 master module.