Pages: [1]   Go Down
Author Topic: DUE I2C speed  (Read 2858 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I'm using Arduino Due for a project with Pololu's MiniIMU v9 (http://www.pololu.com/catalog/product/1268). I tried it first with my arduino mega 2560 rev2 and works a treat, even when powered from 3.3V. The problem is that, every time Arduino Due reads something via I2C from the IMU, it takes almost 0.01 seconds, which is unacceptable for my project. I've changed I2C clock frequency in the Wire library in order to see if it fixed something but it didn't work.
Any idea of what's happening?
Thanks in advance!  smiley-wink
Logged

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

By the way, I've used as many pull-up resistor configurations as I dared, and nothing. It is still as slow as hell. Any ideas anywhere? smiley-roll-sweat
Logged

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

I have that IMU, when I get around to testing it on my DUE I'll let you know how it goes.
Logged

Offline Offline
Jr. Member
**
Karma: 9
Posts: 79
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My tests of read/write on an I2C EEPROM are about the same for UNO and DUE at 100KHz and 400KHz.  Here are read/write times in microseconds for small block read/writes.

Code:

  arduino uno  100KHz    400KHz    DUE  100Khz      400Khz
Bytes   write   read    write  read    write read   write read (microseconds)
10       1340   1480    1112  1176      1197 3124    775   339
20       2340   2500     780   840      2104 3124    775   573
30       3360   3512     448   504      3014 3127    775   806
 
 maple      100KHz        400KHz
Bytes   write   read      write  read   (microseconds)
10       1193   1306        308   336
20       2095   2202        535   561
30       2997   3100        761   791


Beaglebone  I2C @ 100Khz
bytes   write   read   (microseconds)
10       1320   1669
20       2245   2559
30       3128   3374

 Raspberry Pi  I2C @ 100KHz
10       1268    1449
20       2185    2357
30       3074    3268


With the DUE, you have to restart the IDE if you modify library settings, e.g. TWI_CLOCK in  hardware/arduino/sam/libraries/Wire/Wire.h
Logged

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

Thanks, it seems to be solved =D!
Logged

Offline Offline
Jr. Member
**
Karma: 9
Posts: 79
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ooops, 100 Khz read column for DUE I2C test above is wrong.  It has been corrected, current performance results are  in I2Cperf.txt at

  https://github.com/manitou48/DUEZoo
Logged

Pages: [1]   Go Up
Jump to: