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
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview