I want to use 2 I2C lines and 1 SPI simultaneously for my requirement. I found Arduino DUE and Arduino UNO R4 has 2 I2C lines and 1 SPI.
I am new to Arduino. Would like to know if Arduino DUE and Arduino UNO R4 supports 2 I2C lines and SPI communication at same time. If not, please let me know which Arduino variant can support this requirement.
Both I2C and SPI are a bus. You can connect multiple devices to the same bus.
For I2C, the device that you talk to is determined by the address of the device.
For SPI, the device that you talk to is determined by the chip select of that device.
My I2C master is different controller. I have requirement to connect 2 devices externally which communicates to master over I2C. Since I want Arduino to simulate these devices, can I use single Arduino as slave - differentiate based on address from master - and perform action in Arduino or I need to have 2 separate Arduino device
Since Arduino DUE and Arduino UNO R4 supports 2 ports, can I use 1 Arduino device and use both I2C ports simultaneously as 2 external devices.
If I have requirement to use 2both the I2C ports from Arduino, is it possible? Does Arduino library supports this?
I would like to know if I can use both I2C ports from Due or R4 as 2 slave devices simultaneously.
I read in one of the post default I2C can be used. For second I2C some pull register to be connected. So I am worried if Due or R4 supports my requirement using both the ports together. Whether Arduino library (Wire1 & wire2) APIs can be used same time?
It is not a matter of library or Arduino itself - it depends on how this library written on defined MCU. I don't know about Due or R4, but on STM32 you can use i2c1 and i2c2 simultaneously.
You ask if you can use the two I2C interfaces at the same time as a Slave.
I have a question for you: Can those boards be a reliable I2C Slave for even a single I2C bus ?
The Master might not support clock pulse stretching. That is needed when a processor acts as a I2C Slave.
In theory, it could work. But I'm afraid that there are too many problems and that it will not work.