chipKIT® Development Platform

Inspired by Arduino™

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

Created Wed, 06 May 2015 00:39:38 +0000 by andcvi


Wed, 06 May 2015 00:39:38 +0000


I have built my own version of an Arduino style board using a PIC32MX150F128D and the UART bootloader from this link 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