Go Down

Topic: Dual I2C on Arduino DUE (Read 1 time) previous topic - next topic

ivanseidel

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
Arduino DueTimer | https://github.com/ivanseidel/DueTimer
Arduino Thread | https://github.com/ivanseidel/ArduinoThread

mhanuel26

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,



Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy