chipKIT® Development Platform

Inspired by Arduino™

I2C bus Frequency

Created Sun, 04 Mar 2012 21:20:22 +0000 by nuxeh


nuxeh

Sun, 04 Mar 2012 21:20:22 +0000

Hello.

Is there any way to change the I2C bus frequency on a ChipKit? It seems to be 100 kHz by default.

I have tried changing the frequency in the twi.h header file in the MPIDE distribution, which doesn't appear to change the bus frequency, as it does for Arduino.

Thanks!


dangeljs

Mon, 05 Mar 2012 18:28:02 +0000

Which twi.h file did you alter? The one in: \mpide-0022-windows-20111212-test\hardware\pic32\libraries\Wire

or the one in:

\mpide-0022-windows-20111212-test\libraries\Wire

The first should be the correct one for the Chipkit.


nuxeh

Mon, 05 Mar 2012 22:21:06 +0000

Aha! Yes, that solved it. I had never thought there was a separate set of libraries for the PIC32 architecture, but it makes quite a lot of sense that there is.

It even seems to work for a 1 MHz bus speed. Very nice indeed.

Thanks for your help, dangeljs