Arduino Forum

Products => Arduino Due => Topic started by: ivanseidel on Jan 09, 2013, 03:31 am

Title: Dual I2C on Arduino DUE
Post by: ivanseidel on Jan 09, 2013, 03:31 am
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
Title: Re: Dual I2C on Arduino DUE
Post by: mhanuel26 on Jan 19, 2013, 01:33 am
Hello,

Wire and Wire1 for I2C and I2C1 receptivity.  


See Wire.h for details...

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



Cheers,