Connecting the Arduino and PIC using I2C

Having done both PIC and Arduino before I decided to start on connecting the two using I2C.  I had naively assumed that this would be straight forward, given that it is a serial protocol and supported by the hardware (PIC).....

After much searching for example of a PIC slave using Hi-Tech C I was no further forward, so turned to the 16F690 specification.  After two evenings battling the compiler and chip I finally got it working.  The Arduino side was easy, working first time.

I designed a simple data exchange that allowed the Arduino to set a command followed by variable length data buffer to change the register values in the PIC, which changed the LEDs lit on the development board :) Happy days

Next steps is to tidy-up the PIC code and sort out PIC->Arduino data transfers.  Once this is complete I will post the code.

If you need the code sooner drop me an email.....


  1. Hello there. I am trying to interface an Arduino Uno with a dsPIC33 (Slave and Master respectively) and the code I am using isn't working that well. Could you please send me your code so that I may be able to see what it is I'm doing wrong?

    Thank you very much and have a good day.

    1. Arduino code here
      Will look for the pic code later, its very rough hope it helps


Post a comment

Popular Posts