chipKIT® Development Platform

Inspired by Arduino™

MAX32 I2C

Created Thu, 18 Jul 2013 07:38:20 +0000 by Graham1904


Graham1904

Thu, 18 Jul 2013 07:38:20 +0000

I have used the I2C module before on PIC18's etc and it works well but I am battling to get it to work with the MAX32 and the IDE doesn't offer any projects with this peripheral.

I have downloaded the PIC32MX library user guide and followed one of the examples but still get no joy with I2C1.

Has anyone any suggestions ?

Graham Durban South Africa


majenko

Thu, 18 Jul 2013 09:04:35 +0000

You just #include <Wire.h> and use any of the swathe of Arduno I2C examples.

Wire.h is the (as Arduino named it for some strange reason) I2C library.


Graham1904

Thu, 18 Jul 2013 09:59:08 +0000

Majenko

Thanks for the F/B. I see that Wire.h is the I2C and that at least works but now I need to write the app in C32 to form part of my project.


majenko

Thu, 18 Jul 2013 10:41:47 +0000

Then I'd take the source to Wire.h (hardware/pic32/libraries/Wire/Wire.cpp) and use that as a starting point - look at how it's done in there and use that as a basis for your own code.