Pages: [1]   Go Down
Author Topic: Dual I2C on Arduino DUE  (Read 1537 times)
0 Members and 1 Guest are viewing this topic.
Brasil
Offline Offline
Full Member
***
Karma: 4
Posts: 125
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, i would like to know two things about I2C software on the Arduino DUE:

* How can i init the other I2C port (on pins on 20 and 21)? There is no parameter on the initialization to specify that, and i don't believe that there is two objects (Wire1, Wire2);

* How can i change the speed of the I2C bus? SAM3X ARM Cortex M3 IC supports 400 khz (I2C Fast mode) and also slow mode (100khz), but as i know, there is no configuration for that.

Thanks
Logged


Offline Offline
Newbie
*
Karma: 1
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

Wire and Wire1 for I2C and I2C1 receptivity.  


See Wire.h for details...

Code:
#if WIRE_INTERFACES_COUNT > 0
extern TwoWire Wire;
#endif
#if WIRE_INTERFACES_COUNT > 1
extern TwoWire Wire1;
#endif


Cheers,


Logged

Pages: [1]   Go Up
Jump to: