chipKIT® Development Platform

Inspired by Arduino™

How to initialise/instantiate SDA2, SCL2 (I2C port) on WF32

Created Thu, 22 Jan 2015 04:30:52 +0000 by samdesd


samdesd

Thu, 22 Jan 2015 04:30:52 +0000

Hi,

Can anyone help me know how to initialize the SCL2/SDA2 port on Chipkit WF32?

In fact, I've added the #include <DTWI.h> OR #include <DTWI0.h>.... yet, I got the compile error.

The WF32 board definitions has the following info: /* Declarations for Digilent DTWI library. ** DTWI0 is SDA2/SCL2 on A4/A5 pins 18/19 (see above comment). ** DTWI1 is SDA3/SCL3 on on digital pins 0 & 1. ** DTWI1 is SDA4/SCL4 on on digital pins 12 & 11. */

Thank you.

SAM


tom21091

Tue, 19 Jan 2016 19:27:59 +0000

Hi Sam,

I found your post while looking through old unanswered posts. Sorry you never got an answer. Are you still having trouble getting the I2C to work on the WF32? An example of I2C using the DTWI library can be found in later versions of MPIDE under Wire > I2CMasterEEPROM. Another small example can be found here [url]http://chipkit.net/forum/viewtopic.php?f=7&t=3198&p=13353#p13356[/url].

I hope this helps!

Tommy