The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [i2c]

I²C (Inter-Integrated Circuit) is a multi-drop serial bus invented by Philips (now NXP) for communication between ICs on the same PCB, i.e. short distance.

Filter by
Sorted by
Tagged with
0
votes
2answers
54 views

Why is the ADDR flag cleared without reading the SR2 register?

I am doing I2C project with MPU6050 using STM32F4DISCOVERY board. The ADDR bit in SR1 register is clearing in one instruction execution without reading SR2 register. Because of clearing ADDR bit, I ...
0
votes
1answer
57 views

Master SW (bit-bang) I2C with Interrupts?

I've written a set of "bit-bang" software routines for the PIC18F2620 device. These routines work well for reading and writing 24LC256 EEPROM and DS1307 RTCC devices for the most part. (I wrote this ...
0
votes
1answer
25 views

FIFO Clock Setup for CMOS Detector

When attempting to construct a miniature laser beam profiler with the Omnivision OV7740 CMOS detector and an Arduino Due, I am running into some problems with FIFO reading/writing. From the datasheet, ...
0
votes
0answers
51 views

I2C and separate power source affects SDA signals

Despite the fact that I2C devices should be able to operate with different power sources I'm having problems with my setup. Specifically, it seems that when I have separate power sources the SDA ...
0
votes
2answers
46 views

Using multiple sensors on the same i2C circuit

It’s possible to control multiple pH probes with one single i2C ph circuit (like this https://www.atlas-scientific.com/product_pages/circuits/ezo_ph.html) ? Rather than buying I2C circuit for each ...
0
votes
1answer
18 views

LSM303CTR 3-wire SPI and I2C - conceptual problem

I'm trying to interface LSM303CTR e-compass from ST-microelectronics with microcontroler. Due to design limitations I have to use 4-wire SPI. This MEMS device has option to switch beetween 3-wire ...
0
votes
0answers
29 views

STM8S005K6 - I2C (Bus always busy)

This question has already be posted but i don't find a solution of my problem. I have an LCD screen (MC20805A6W-BMLW-V2) with I2C communication and I try to communicate with my controller via I2C (...
0
votes
0answers
20 views

APDS 9900/9930/9960

I am trying to write a program that detects up/down and left/right gestures from a gesture sensor using atmega32a. I can't actually read the LEDs and the sensor been used is the APDS 9900. This is ...
0
votes
1answer
64 views

Which pins support i2c protocols?

I have a ESP32-WROOM-32D , it support I2c protocol but when i refer the i2c pins(SDA,SCL) in datasheet ,i couldn't find . datasheet is given below. which pins that support i2c protocols? ...
24
votes
5answers
5k views

Can I use I2C over 2m cables?

In my current project, I need to communicate between a microcontroller and some sensors over I2C. One of them is a temperature sensor, it needs to be placed at approximatively 2 meters far from the ...
0
votes
1answer
43 views

Unable to read data from MCP9808 using i2c

I have a MCP9808 temperature sensor and a Raspberry Pi 3B plus. I had great success reading the temperature from this sensor via i2c on an Arduino Uno, but am not able to read the temperature with ...
0
votes
0answers
28 views

why i2cdetect -y -r 0 cannot detect all my device under /sys/bus/i2c/devices/i2c-0/

i2cdetect -y -r 0 only shows a 0x70 address. But it show has one more 0x6f address: ...
3
votes
1answer
76 views

Need smaller pullups on i2c lines, but design is low power, what is best?

The pullups on my i2c lines are 4.7k. People are afraid of draining the battery by fixing this waveform with smaller pullups, like 2.2k. It doesn't seem much power is wasted considering the short ...
0
votes
0answers
47 views

mpu6050 returns zero, I2C stm32f103

I am working with MPU6050 and STM32f103VE as master. When I wake up the sensor and ask for information it returns 3 bytes of zeroes and the protocol stops working. I only send the communication Part ...
1
vote
1answer
126 views

Strange “step” in i2c plot [closed]

I have some errors during debugging I2C chip. I took an oscilloscope and found some strange artifacts on the log: Maybe somebody has a suggestion about such questions? 1. What are these strange ...
0
votes
2answers
82 views

Need a solution to sent i2c data long distance (prefereably convert to CAN)

Is there any IC available that can read I2C data from a sensor and convert to CAN. I was looking for a low-cost solution to reading i2c data and putting it on a CAN bus. Reading i2c with a ...
0
votes
2answers
113 views

I2C noise from 433MHz transmitter

I have built a little thermostat based on BMP280 temperature sensor over I2C, ESP8266 Lolin v3 and STX882 433Mhz transmitter. I have not added additional pull-up resistors or decoupling capacitors. ...
0
votes
1answer
66 views

Combine two 8bit EEPROM to make 16bit EEPROM

I am working on building a computer out of logic chips. I want to use an EEPROM as the instruction memory. However, my EEPROM's only has 8bits data output, but I want my instructions to be 16bits long....
1
vote
3answers
100 views

Help with I2C Communication

I'm trying to learn how to program a battery charging IC (BQ24193) via the I2C communication protocol. My goal is to write the correct values to it in order to gain the proper charging input and ...
0
votes
1answer
57 views

Help with understanding the Memory Map of MLX90393

(Using a Raspberry Pi 3 Model B+ and python) I needed some assistance in understanding the memory map of MLX90393 I've attached the memory map here and you could also find it in the datasheet. I'm a ...
0
votes
0answers
40 views

Two-way communication between esp32s

I am planning a circuit that requires two-way communication between one esp32 and 3 others. I want to use a master/slave architecture as shown here: They need to be able to communicated via hardware, ...
1
vote
0answers
43 views

IR Temprature MLX90614 Sensor Diffrent behavior based the I2C Scanner Checking

I need to work with Temperature MLX90614 on Arduino, when i used it's default library code, in bread board sometimes i get correct answer, so i used the soldered circuit for it like this: in this ...
0
votes
1answer
71 views

STM32 trying to communicate with 2 I2C. But second one fails

I am trying to communicate with a battery using SMBUS. Battery has 2 sections so it uses 2 separate SMBUS lines. I am trying to read SOC information from two section by using STM32F103C8. First ...
4
votes
2answers
79 views

i2c multi master “undefined conditions”

I have read the I2C bus specification and don't quite understand the limitations of a multi master I2C bus mentioned on page 10: https://www.nxp.com/docs/en/user-guide/UM10204.pdf One the one hand ...
1
vote
0answers
46 views

STM32 I2C Fast Mode Issue

Currently, I am implementing I2C communication with Interrupt. STM32 serves as the slave and Arduino serves the master. MCU: STM32L152RDT6 For previous work, I2C communication in standard mode is ...
0
votes
1answer
38 views

Any side effects of Initialisation and de-initialisation of STM32F0 MCU I2C pin frequently? [closed]

I have one port on my MCU and want to re-define its functionality. Is it possible that something wrong/strange happens if I do it in my main() function? I regularly ...
0
votes
1answer
50 views

STM32 I2C transmitting no data and cannot change the data that is being transmitted

I am trying to establish a SMBus connection by using STM32 chip. When I try to transmit data to battery (0x0D) I see 0x0B with oscilloscope. When I change the data that is being transmitted to 0x00 or ...
-1
votes
3answers
104 views

I2C bus communication Issue

I have connected 3 sensors and they are connected to the I2C line of ATMEGA2560 as shown in figure. In normal condition, they are working fine and providing accurate sense value. But, when one of the ...
0
votes
1answer
108 views

Does the drive strength of a GPIO pin alter with change in temperature?

In low temperatures the functionality of the I2C is being affected, but the slave is working properly and the temperature is also within limit of slave. For that reason I suspect the drive strength. ...
1
vote
1answer
70 views

What does Pass through I2C mean?

On page 3 of this app note the following is said Pass Through—This I 2C control enables communication with all the remote devices, whose device ID and corresponding device Alias fields is ...
0
votes
1answer
168 views

Allegro ACS71020 problem interpreting I2C data

I've added an Allegro ACS71020 to my Arduino project to measure power usage (circuit shown below). I can connect to I2C on 0x63 and I get response (check the image below) - but the values do not ...
1
vote
2answers
72 views

RPI-arduino communication without UART

I'm working on a project where a raspberry pi zero will be the main controller. The pi has to receive information from a GPS module (gy-gps6mv2) over UART. The same pi will be controlling (receive and ...
1
vote
0answers
22 views

DS90UB948-Q1 internal pattern generator

Does anyone have prior experience with DS90UB948-Q1 FPD-Link III Deserializer deserialiser from Texas Instruments ? I am trying to configure the internal pattern generator block sending I2C commands. ...
0
votes
3answers
91 views

Communication protocols

Are the I2C and SPI protocols implemented in the integrated circuits? For I2C, There must be some circuit to be able to process the start bit, device address, internal register Address, Data and ...
1
vote
2answers
134 views

Problems writing with I2C to registers in Allegro ACS71020

I am wanting to change some of the configuration parameters contained in registers in the Allegro Microsystems ACS71020. I am using an I2C version of the IC. Here is the datasheet: https://www....
1
vote
3answers
57 views

Multiple rails I2C bus device from PMIC

I want to use a PMIC chip in my project. As any PMIC, it has a couple of outputs: buck Vout, and an LDO out. The PMIC is operated over the I2C bus. The MCU acts as the host device and runs on Vout, so ...
1
vote
1answer
50 views

Using multiple TCA9548A multiplexers

The case is that I have 5 temperature sensors. I want to connect 4 of them to the first TCA9548A (TCAADDR0), the SDA and SCL busses (from the ports 0 to 3) and connect the fifth one to the second ...
-1
votes
1answer
179 views

What is difference between UART and i2c [closed]

Why do we need communication protocol and what is the difference between UART and i2c other than clock?
1
vote
2answers
55 views

I2C multiple masters, one master has internal pull up, do I need external pull up?

I use 2 MCUs as 2 I2C Masters connect with 1 Slave F-Ram to Read/Write data frequency. One MCU has internal 12k Ohm pull up resistors on SDA & SCL. So do I need external pull up resistors?
0
votes
0answers
43 views

Configuring the clock and LTCD stm32f7

I'm interfacing an LCD using LTDC. That LCD has a touch sensor that works for 400KHz. The touch sensor is interfaced using I2C. My problem is how to configure the clock for both to work. Right now I'...
0
votes
2answers
80 views

How to read multiple I2C sensor (MLX90393) data on ESP32? [closed]

I am using MLX90393 Triaxial Magnetometer Sensors for my project. They communicate via I2C. I am using an ESP32 and coding on Arduino IDE. I found this code on GITHUB and was able to read from ONE ...
1
vote
0answers
64 views

Interfacing touch sensor with stm32f7

I'm having that touch sensor ST IC ST1633i. It's integrated into an LCD. I'm trying to interface with it, but don't know or understand the actual protocol. Here is the protocol So I'm trying to ...
0
votes
0answers
69 views

Putting a variable of type 'float' on the I2C bus

I'm trying to put a variable that is initially not on the I2C bus, to the I2C bus. However, my variable is of type 'float' whereas the RXData/TXData variables on the I2C bus are of type uint_8t. Do I ...
0
votes
0answers
45 views

need help deciphering accel/gyro datasheet for i2c communication using python RPi

I have barely any knowledge in this area, the most I have done is used my RPi3 with pre-built python libraries for sensors such as ADS1115 so I didn't have to go through the process of understanding ...
0
votes
0answers
18 views

STM32091C-Eval: Reading temperature value using I2C Temperatur sensor on the board

I am new as µC programmmer. having dealing with GPIO on the STM32091C-Eval, I wanted to go a step forward working with I2C Interface. On the board i have soldered the SB1 to configure the temperature ...
0
votes
1answer
55 views

MPU6050 connection problem

TL, DR: I experience communication breaks while using GY-521(MPU6050 based) with STM32F4 in I2C communication. And looking for the result of these breaks. Also should I give a 5V Vcc or 3V Vcc to GY-...
0
votes
1answer
81 views

I2C setting MCU as both slave and master at the same time

Hello everyone I'm working on a new project with the TI MSP432P401R microcontroller. I want to have 2 separate I2C buses. I2C bus 1 will set the MCU as the master, whereas the DAC and the pressure ...
0
votes
2answers
49 views

MSP430 MPU9250 MPU6050 I2C: After sending the address NACK

I have a problem with read from my MPU6050/MPU9250. Both are connected with AD0 to ground so both should have the address 0x68. With both sensors the same behaviour ...
0
votes
0answers
51 views

Gathering accelerometer data over I2C not updating every 1 ms

I am using an STM microchip to communicate with an IMU over I2C. I am requesting 3 axis of acceleration information from the IMU (x,y,z). I have the ODR Selection frequency set at 1.66 kHz. Currently ...
0
votes
1answer
47 views

Removing optimization changes I2C timing

I'm at using SAM E54 Xplained Pro to get temperature readings from a MCP9600 hooked up to a thermocouple over an I2C bus. I'm using Atmel Studio 7 with I2C drivers generated with Atmel Start. I'm ...