when im using the Wire library and talking with an i2c slave, i get long pause (around 1 sec) somtimes.
this is not happening when i use the code on the Mega hardware.
the problem is i need more i2c buses and the Giga was my solution for that (i want to avoid software i2c).
have someone encountered this problem with the Giga?
Why?
A TCA9548A breakout board is commonly used when device addresses can't be changed.
Leo..
Welcome to the forum.
Arduino Giga R1 WiFi has a STM32 processor with three I2C buses: https://store.arduino.cc/products/giga-r1-wifi
The Arduino Giga is a 3.3V board and the Arduino Mega is a 5V board. That makes a big difference, even on the I2C bus.
Can you tell more about your project ? What is it for ? How long will the I2C wires be ? and most important: What are the I2C Slaves ?
Sometimes it is easier to use a smaller board with extra hardware for more input/output pins. The Raspberry Pi Pico is cheaper and a good all round board.
i'm communicating with 2 motors that are on the same i2c bus (each with different address) and with 2 modules of 2 magnetometers each on the other 2 i2c buses (each magnetometer module has only 2 addresses available).
the i2c wires are no more than 20cm long
Please tell more.
What motors, which magnetometers ? Do motors have a I2C interface these days ? Can you give links to the modules (a link to where you bought them). Can you show a schematic and a photo. What are your pullup resistors ? A magnetometer is a compass, you only need one, or do you use them as hall sensors ?
The I2C bus is a weak bus, because the high level is there only with pullup resistors.
Most I2C problems result from wrong setup and connections.
The Mega has I2C pullups on board. What's installed on your other board?
Hi, @ofk470
Welcome to the forum.
Can we please have a circuit diagram?
An image of a hand drawn schematic will be fine, include ALL power supplies, component names and pin labels.
Thanks... Tom...
If you use the address pin as chip select then you can have many of them on the same I2C bus.
Leo..
thank you all for replying!
my real problem is communicating with the motors.
has anyone encountered such a case of i2c stops working for around 1sec and starts working again?
why does it works with the Mega and not with the Giga?
it happens even if i disconnect every but the motors
Time to answer all the questions.
You have been told that logic voltages of those two processors is different.
How did you solve that.
Leo..