Go Down

Topic: Simulate multiple I2C address in Due (Read 1 time) previous topic - next topic

hkwoo

I am working a project which use Arduino due to simulate different I2C slave device.

For example, Due should respond to address 0x56, 0x57, 0x58.....from Master

I can do it with Nano. However, I can't find a way to do same thing in Due. Is it possible to do it in Due?

Thanks a lot.

ard_newbie


If you need an I2C communication between 2 DUEs, one in Master mode and the other one in Slave mode, care must be taken with pull-up resistors.  SDA/SCL have already pull-ups of 1K, unlike SDA1/SCL1 which have no pull-ups. Hence you want to connect DUE1 (SDA/SCL) to DUE2(SDA1/SCL1).

There are numerous threads in the DUE sub forum with the I2C topic because there is no glitch filtering provided by the uc either on SDA/SCL or SDA1/SCL1. A 100 K resistor in serie on the SDA/SDA1 line and idem on the SCL/SCL1 line fixes a part of the issue.

There's also this thread among others if you use the wire library:
https://forum.arduino.cc/index.php?topic=308479.0

Plus you can find example sketches using only TWI  registers with a very useful I2C bus reset function to be used whenever the bus hangs.

Go Up