This is a nonblocking I2C master routine for the dsPIC33FJ128GP204 MCU and compiled with the XC16. The purpose of this code is to write to an external flash chip.
To get started include the header file and run the I2cInit. After that, you're free to read and write bytes as you please. I've written some examples so you can work off of those. Happy coding!