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
44 views

datasheet register address is not in HEX?

I am reading the this datasheet for the CAP1188 touch sensor and can't figure out what these "register addresses" in the far left column mean. I am used to seeing HEX addresses in datasheets such as <...
1
vote
1answer
57 views

I2C communication problem with nRF52840

I am trying to make LSM6DSR (STEVAL-MKI194V1) work with nRF52840 DK using TWI Communication. Problem: Firstly, I modified the TWI sensor example to use the accelerometer (LSM6DSR). When I test my ...
0
votes
0answers
29 views

Touchscreen keeps failing to communicate with raspberry pi, except when I touch the INT pin

I bought a display with a i2c touchscreen from Aliexpress and hooked it up to my Raspberry Pi 3b+. The screen part works fine, however, the touchscreen part is flaky. When I just boot the pi, the ...
0
votes
0answers
87 views

I2C Bus getting Locked UP on Single Master - Single Slave System

I was trying to develop a I2C driver function for reading data from a proximity sensor(Cypress CY8CMBR3102) and initially the function worked very well and successfully. But while continuously reading ...
0
votes
1answer
49 views

I2C pull-up to multiple voltage question

Quick rundown of what's going on: I am using two PIC32MX to both be masters of I2C. They will be remotely controlled to determine who is the master at any given moment. Due to redundancy purposes, ...
1
vote
1answer
95 views

PCB Design - How much length can I2C lines differ by?

I am designing a PCB that uses I2C communication and was wondering how much length the SCL and SDA lines can differ by. EDIT: Clock frequency can be anything from 95kHz to 400kHz. Is there a ...
0
votes
1answer
66 views

How to chain I²C level shifters?

How can I chain two level shifters in a multi-master I²C system? The following picture shows the I²C bus. Due to low-voltage to the masters, the A side (low-voltage side) of the level-shifter needs ...
0
votes
2answers
50 views

ESP32 I2C pin routing

I have looked through several documents, but I haven't find found a clear answer which pins on ESP32 support I2C communication. Can the I2C be routed to almost any I/O pins? Are there certain pins ...
2
votes
3answers
404 views

Is there a way to extend the length of wires for I2C connection? [duplicate]

I would like to connect a BME280 sensor to an Arduino board through the i2c bus connection. I read that i2c was not meant to be used over long wires and will not work properly over 50cm. I want to get ...
2
votes
1answer
37 views

3.3V I2C Logic on 1.8V Device

I have designed a board with the ICM-20789, but am having trouble keeping stable voltage values on the I2C bus. Datasheet I have followed the schematic that was listed inside the datasheet, and that ...
0
votes
0answers
49 views

MCU based I2C master receiver mode includes transmitter mode or not?

If I am programming an MCU I2C peripheral as a master of I2C bus that will be receiving data from other slaves on the bus. So I will set its direction as 'I2C_Receiver.' But since an I2C slave will ...
0
votes
1answer
32 views

I2C bus arbitration - communication layer

I want to understand about the communication layer on which I2C Bus arbitration is done. My question is based on this question which was previously asked here. The accepted answer states that Bus ...
0
votes
1answer
61 views

I2C Multimaster Operation

This is with reference to this question and this App Note In the App note, Page 4, it discusses about the steps for multimaster which I have mentioned it below : " The following describes the ...
0
votes
2answers
54 views

I2C Communication Open drain benefits vs Push pull

I am reading this TI I2C App Note for understanding the I2C operation and need to understand how Multi master I2C will operate. I was not able to understand this para in the app note, "Since no ...
6
votes
5answers
1k views

How to end sending data over I2C by Slave or Master?

Let us say a Slave or Master is sending multiple bytes to the receiver on I2C bus and the number of bytes is not defined before hand. So then how will the sender tell the receiver that it has no more ...
0
votes
0answers
24 views

I2C High Speed Multiple Slaves Layout

I am working on a system where I need to have 16 I2C devices on one bus. Due to data rates I need to run at 3.4 Mbit high speed mode. Are there any design/layout guidelines to help deal with a large ...
0
votes
1answer
54 views

NXP PCA9615 I2C differential buffer - failure on SCL line

I am using the PCA9615 part to extend an I2C bus. The PCA9615 converts I2C to a differential bus. PCA9615 https://www.nxp.com/docs/en/data-sheet/PCA9615.pdf There is a control box and a remote ...
0
votes
2answers
69 views

I2C data sampling is done at clock edge or level

I am trying to understand I2C data bus from this document. It explains the START-SLAVEADRESS-R/W-ACK-DATA.. as the master-slave take turns to get hold of the shared bus for mutual communication. One ...
0
votes
0answers
31 views

how to power cycle i2c sensors in battery enabled systems that enter deep sleep

I am looking for a way to power cycle multiple i2c devices that are connected the same i2c bus, having an ESP32 mcu as a master, in case the i2c bus hangs for any reason. The circuit has a lipo ...
0
votes
2answers
43 views

Data send only in MCU based I2C Slave

I want to know that is it possible that a Slave I2C device which is a 32-bit MCU, for example STM32F407, I write its I2C data send function and send data through it after every 1 sec? I am asking this ...
3
votes
0answers
74 views

Increasing system clock frequency on STM32F303 drops I2C clock proportionately - why?

I'm trying to figure out a weird little issue I've discovered while debugging another element of my code. I've got a STM32F303K8 reading and writing to an I2C peripheral. The I2C clock speed is ...
4
votes
1answer
69 views

Large delay between I2C messages on STM32F303 - trying to read as fast as possible

I've got a sensor that I'm reading via I2C. My end goal is to be able to maximize the rate at which I can take these readings. In order to read, I have to write an zero-byte I2C message to the slave ...
0
votes
1answer
62 views

MCU to MCU I2C communication

I have 2 MCUs and I want to connect them together over I2C bus. MCU1 will be Master while MCU2 will be Slave. Only these 2 MCUs are on the bus. This configuration is fixed and I cannot change it. ...
0
votes
1answer
37 views

I2C Problem in TCA9539

I am using stm32f103 and TI's TCA9539 and TCA6408A Port extender.Both of them support 400-kHz(I2C Fastmode) and 100-KHz (I2C standard mode) clock frequencies. I use 3 TCA9539 and 1 TCA6408A;here is my ...
0
votes
1answer
50 views

Bit Bang SCCB Issue

I am trying to bit bang an SCCB communication between an OV7670 camera module and an STM32F407 Discovery Board. In the datasheet, it is stated that the slave write and read addresses for the OV7670 ...
0
votes
0answers
28 views

OTI-301 Infrared Sensor

I built an infrared thermometer using the MLX90614 IR sensor and an Arduino Nano. I needed a little higher temperature reading so I changed to the OTI-301 sensor hoping that it would work with the ...
0
votes
2answers
44 views

Slave can't pull I2C low

I'm trying to use 3 TCA9539PWR and a TCA6408A on an I2C bus. Here's the schematic diagram: However, when I try to send the TCA9539PWR's addresses , none of them responds (no ACK) and when I try to ...
0
votes
0answers
25 views

HAL SCCB Commuincation via I2C: HAL_ERROR Status

I am using an STM32f4 Discovery board to interface with an OV2640 Camera. When attempting to set the SCCB registers, I am using I2C. However, when doing a simple test I cannot connect to the device. ...
0
votes
0answers
45 views

Custom 12 V DC motor control with ESP8266 without PWM

Scenario (you might want to skip the lengthy back-story) I'm trying to integrate my home ventilation system with my home automation. It currently consists of ten fans with ceramic heat recovery ...
0
votes
2answers
47 views

Order of I2C signals on the header [duplicate]

I am wondering are there any standards for the order of signals on I2C header? We get many I2C devices on the market, but the order of pins on the headers is inconsistent and hence we may not be able ...
1
vote
1answer
68 views

EEPROM Read Operation Always Returns 0xFF

I'm working with a AT24C04 EEPROM which communicates with a LPC1768 MCU on a I2C bus. I try to write a 8 bit data (0xF0) on the 0x00 Address of the memory but when I want to read the content of this ...
5
votes
2answers
842 views

Is the SCK line in I2C unidirectional or bidirectional?

I've always considered SCK to be a unidirectional line since the master generates/transmits the clock signal and the slaves "see" the generated pulses. I have found many sources that agree with this ...
0
votes
1answer
60 views

Connect I2C Oled via USB to Linux Box [duplicate]

I connected a 1.3" SH1106 Oled via the I2C pins to a i2c-to-usb adapter (UMFT201XB from FTDI) and on my Linux Box (Z83 mini pc with Ubuntu 18.04) I can see the device under /dev/ttyUSB0. This is the ...
0
votes
1answer
75 views

Connection between 3v3 and 5v I2C without have a reference voltage

I've two board that must communicate trough I2C BUS. One operates at 3v3 and the other one at 5V. I unfortunately can't use a reliable level shift IC becouse the physical connector on the board share ...
0
votes
0answers
27 views

PIC16F7X I2C Issues With 24AA01/24LC01B EEPROM

I have an existing PCB that is no longer supported by the manufacturer and has been plagued with software issues for years. So i don't have much control over how the board is laid out and what ...
0
votes
1answer
39 views

stm32f0 sht35 i2c communication failure

I need to read temparature and rh values from sht35 sensor. here is the datasheet I am using stm32f0 and I have 2 different sensor. problem keep occurs with both sensor. Address pin connected to the ...
0
votes
2answers
62 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
61 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
31 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
52 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
50 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
19 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
34 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
23 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
66 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 ...
1
vote
1answer
51 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
79 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
52 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 ...