Arduino Due TWI/I2C channel 1

I'm having difficulties getting the second I2C channel working correctly.

Running the example code "I2C Digital Potentiometer" i got the expected result. (TWI_0.bmp logic analyzer screen cap)

i then modified it for channel 1 by changing "wire" to "wire1" with no success. (TWI_1.bmp logic analyzer screen cap)

// I2C Digital Potentiometer
// by Nicholas Zambetti <>
// and Shawn Bonkowski <>

// Demonstrates use of the Wire library
// Controls AD5171 digital potentiometer via I2C/TWI

// Created 31 March 2006

// This example code is in the public domain.

// This example code is in the public domain.

#include <Wire.h>

void setup()
  Wire1.begin(); // join i2c bus (address optional for master)

byte val = 0;

void loop()
  Wire1.beginTransmission(44); // transmit to device #44 (0x2c)
                              // device address is specified in datasheet
  Wire1.write(byte(0x00));            // sends instruction byte  
  Wire1.write(val);             // sends potentiometer value byte  
  Wire1.endTransmission();     // stop transmitting

  val++;        // increment value
  if(val == 64) // if reached 64th position (max)
    val = 0;    // start over from lowest value

SDA1 and SCL1 both have added 1K5 pull-up resistors.
Has anyone had a similar problem or have a suggestion to resolve this?

TWI_0.bmp (879 KB)

TWI_1.bmp (879 KB)

Hello silen1985,
The whole Due's TWI code is OK and perfectly handles both I2C peripherals (TWI/TWI1). IMHO, your issue should be related to hardware. I'd recommend to use a different pull up value like 10K. Regards,


The outputs of the Due is about 4 mA, the Arduino about 20 mA... for best performance the IIC Pull ups should be 2k2 ohms for a 1.5 mA bus current. 10k will allow 330uA which makes length and thus loading capacitance more of an issue than the 2k2 value would.


thanks for the seggestions

after checking the pull-up ressistors again i found that they were connected to GND not 3V3 when they were resoldered the board worked as expected.