How to access the 2nd I2C port in PIC32MX150F128D using Wire Library

Post Reply
andcvi
Posts: 12
Joined: Fri Oct 31, 2014 11:33 pm

How to access the 2nd I2C port in PIC32MX150F128D using Wire Library

Post by andcvi » Wed May 06, 2015 1:39 am

Hello,

I have built my own version of an Arduino style board using a PIC32MX150F128D and the UART bootloader from this link

viewtopic.php?f=17&t=2438&hilit=BB32_150_UART and also using the ChipKit CMOD board definitions.

This bootloader uses PIC pin 1 & 44, UART2, which also has the SDA1 & SCL1 port, I would assume the wire library uses this port as default as there seems to be no parameters to select the 2nd I2C port PIC pins 23 & 24 SDA2 & SCL2, and the board_def.h only says 1 I2C port

The board so far has tested OK, I can use the Hardware interrupts INT0-4, analog read & write, etc, but have not tested the I2C function yet.

regards Andrew

Post Reply