mityeltu 0 Report post Posted June 17, 2016 After searching for a long time to find some decent working examples (that I could understand and follow), I managed to cobble together a very basic, simple working example of I2C master and slave. In additon, the master communicates via UART through MAX232 to the PC serial port. This is NOT elegent, but it does work. The hardware is a pair of 16F1519 with internal 8MHz oscillator, resistor on the SDA and SCL (I2C) buses are 4.7k to VCC (+5V), LED is on both master and slave at PORTD.1 (pin 14), MAX232 chip is interfaced per the attached drawing using info from the datasheet. Tha's all there is... well, and the serial cable which follows the attached drawing. (NOTE: if the picture of the connections is too small, I found it here: http://microcontrollerprojects00.blogspot.com/2012/03/pic-serial-communication-tutorial-uart.html The terminal program I am using is Realterm 2.0.0.70 - make sure you change the port to 9600 baud and set the port to whatever your serial port is (Port 1 on my laptop) and click "Change" I hope this helps others. Happy coding, mit 16F1519_I2C_Master.cpp 16F1519_I2C_Slave.cpp Quote Share this post Link to post Share on other sites