Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
40 views

PIC16F18877: Using I2C to read sensor (LSM9DS0) value

Every time I go through the code step-by-step in debug mode, I end up having the same value in SSP1BUF even after changing the orientation of the sensor. I send ...
1
vote
2answers
37 views

3.3V I2C SDA/SCL but 1.8V VDD?

I'm trying to avoid the use of a level shifter in a design, but it would unfortunately require that I communicate at different voltage levels than what I power the device at. If I communicate with a ...
0
votes
0answers
25 views

Connect a microcontroller with Bluetooth to ssd1306 OLED [on hold]

I need a small (max 15x40mm) programmable microcontroller with Bluetooth which have at least 3 GPIOs (i need 2 for display and one for a analog switch) and support I2C communication for ssd1306 OLED. ...
1
vote
2answers
116 views

Multiple instances of same device on I2C bus

I am currently designing a board where I need to include a whole bunch of I2C devices. Since the number is quite high, address clashing is an issue, that of course we can solve implementing different ...
0
votes
1answer
53 views

Regarding pinout of PCF8574 I2C 8-bit expander

I need some help understanding the pins of I2C 8-bit expander (PCF8574AT) that looks like this, https://mbrobotics.es/blog/arduino-lcd-1602-i2c/ In the datasheet for this part, there is a pinout ...
0
votes
1answer
41 views

Compiler error when using HAL functions for I2C communication

I am using the board STM32F3 and I am trying to establish I2C communication between the microcontroller and the accelerometer LSM303DLHC by using the HAL functions. This is the code: ...
0
votes
0answers
36 views

Hacking an eight cell battery monitor

My goal is to monitor each cell voltage of a seven cell li-ion battery and send this to a Linux board, specifically the Jetson TX2, over i2c. There does not seem to be any off the shelf component that ...
0
votes
0answers
27 views

extra i2c bus and circuitpython lib(Raspberry Pi) [migrated]

I'm a newbie to Ras Pi and I am having trouble with i2c sensors. I bought SHT31d from Adafruit Industries to measure Temp and Humidity in several spots in my house. I used to use DHT22 before, but ...
0
votes
3answers
100 views

How to define a microcontroller pin as open collector or open drain?

Source I have understood the fundamental theory of open collector and open drain configuration. But the problem is how to define/make a micro controller's pin as open drain? Can any pin of a micro ...
0
votes
1answer
34 views

si7021 with 5V MCU [duplicate]

i need to connect Si7021 wich is an 3.3v I2C humidity sensor with Arduino, this sensor has open drain SCL and SDA drivers. is it possible to connect this sensor directly to Arduino 5V?.
1
vote
1answer
113 views

Single I2C EEPROM 24C02 uses all eight addresses by itself

I was scanning for a used address by I2C EEPROM (24C02). Contrary to my expectations, it returned all eight possible addresses (0x50-0x57) instead of the hardwired one. I thought the problem was in a ...
2
votes
2answers
65 views

Multiple slave I2C on different power rails

I read following threads, but still there are some unclear parts for me. Multiple I2C devices with the same address I2C Pull-ups with Multiple Power Supplies Design for Multiple I2C slave devices I ...
1
vote
1answer
57 views

I2C bus line over different layers in an arc

I have the following board design in mind: It's a 4 layer, ~5cm diameter board where 10 slave PCB's will be soldered to it that are connected over the I2C bus. The trace line you see is roughly 8 cm ...
-1
votes
0answers
72 views

How to deal with long distance I2C

I have 8 SRF02 ultrasonic rangers connected into I2C bus. They have to be integrated into a robot of dimensions 600mm x 800mm (for safety system purpose). I tested the setup on a breadboard with ...
0
votes
0answers
16 views

OSError: [Errno 121] Remote I/O error or pigpio.error: 'I2C read failed' on MPU6050

So I use MPU6050 to get acceleration from stepper motor linear rail movement(steper motor working in thread, I use pigpio for the motor) by make the MPU6050 can work on threading and it can show data ...
1
vote
2answers
73 views

How to correctly send the data I received via I2C over UART?

I am using an atmega328p and writing firmware to display the data I receive via i2c in putty. I read the data I receive as follows: ...
1
vote
1answer
51 views

Ringing issue on I2C FM+ bus between MCU and few sensors - Power supply issue?

I'm experiencing some issues while probing a problematic I2C bus on the oscilloscope. We want to interface several TLV493D-A1B6, with a STM32L4 (we are working as well on STM32F4 and have the same ...
0
votes
1answer
40 views

Write collision for multiple reads - PIC24 I2C

I am trying to poll a CAP188 sensor so I'm sending it read commands in a while loop, but the first read works and then on the second read when I send the slave address it detects a write collision. ...
0
votes
1answer
71 views

At what edge of the clock, SDA signal is sampled in I2C for data? At rising edge / falling edge / after rising edge?

I found this from wikipedia page. It says, data is sampled after SCL line rises.
2
votes
2answers
81 views

Just read a Register

I am using a STM32F103CBT6 as I2C Master. After sending the I2C Adress of the Slave I need to clear the Addr bit in the SR1 register. The Datasheet states: "ADDR: Address sent (master mode)/matched (...
0
votes
1answer
58 views

What does it mean when i2c_smbus_read_byte() returns 0

i2c_smbus_read_byte() returns a negative value when there is an error in reading data. But what if it returns 0? Following is the code from adt7316-i2c driver ...
0
votes
1answer
42 views

I2C pullups for level shifting

If I want a breakout with two sensors on it, one operating at my MCU's voltage (3.3V) and the other requires a drop to 1.8V, do I need two sets of pullup resistors for both voltage lines? Can I do ...
1
vote
2answers
54 views

Problem I2C reading RA8875 using TM4C123

I have been working with I2C protocol to create some code for the RA8875 (see for I2C from page 67) using a Tiva board (TM4C123, I2C chapter from page 997), and I was able to paint in the display or ...
-1
votes
0answers
74 views

STM32 I2C communication hangs

I'm currently try to use the MS5611 pressure sensor (sitting on a CJMCU-117) over I²C with libopencm3 on a STM32F103C8. Since the i2c_transfer7() of libopencm3 ...
1
vote
0answers
31 views

What is the maximum supported I2C mode in the FS32K146?

In the S32K146 user-manual guide, it is mentioned as High-Speed mode is not supported by this device. (Page 1481). But in the coming section of the user-manual it is mentioned as device support HS ...
1
vote
1answer
34 views

I2C: Trying to read multiple registers, getting first register repeated instead

I´m trying to read registers 0x28 through 0x2D from the L3G4200D (gyroscope, datasheet), which is part of the GY-80 board, using the esp32 (I2C info) as a master, which is part of the LOLIN32 board. ...
0
votes
1answer
118 views

AVR Can Write I2C, but Fails to Read (Fails to Write Register Address)

I'm using an ATMega328 DIP Package with a TLE493D(A0) (and manual) 3-axis hall effect sensor. I've done successful reads/writes to other I2C devices (AT42QT2120), but I'm having issues with the TLE493....
0
votes
1answer
67 views

I2C driver for MSP432

I am trying to develop a I2C driver for MSP432. As of now, I am interfacing a accelerometer through USCI B2_ module on MSP432. The problem that I am facing is I am getting a NACK in the IFG register ...
2
votes
1answer
128 views

I2C Scanner not working properly

First of all, please see my other question HERE as it is related (Any help with that is greatly appreciated too). If you read through my other question, you will know that I am attempting to ...
1
vote
1answer
46 views

Communicating with I2C devices using an RTL8710

I've connected an RTL8710 (in "Rtlduino" form) to a MCP23008 (on a breadboard) via I2C as follows: I'm using rustl8710 to program the RTL8710, which works fine and I've already hooked up a display ...
0
votes
0answers
31 views

BLE Nano I2C on P0_10

I have a project where an nRF51822 (BLE Nano v1.5) is an I2C master and communicates with an Atmega328. I have communication working over I2C just fine using various pins. However, when attempting to ...
2
votes
2answers
441 views

How to read data from this sensor?

I am using the MLX90393 Magnetometer IC from Melexis. More specifically, I am using the breakout board by Sparkfun. I am still a beginner when it comes to programming, and this is my first time trying ...
0
votes
0answers
36 views

I2C line pulled low by MCP23017

A simple interface of MCP23017 with Rpi using I2C lines. Since there is already an internal pull-up resistor of 1.8k on rpi I didn't use any pull-ups n I2C lines. Running ...
5
votes
4answers
666 views

Relationship between I2C drawn energy / power consumption and data rate

Referring to just what the I2C lines draw, am I wrong thinking that the higher the clock frequency the shorter the time there will be (the same amount of) current flowing through the pullups and thus ...
0
votes
1answer
64 views

MS5611 sends additional byte after NACK

I'm currently try to use the MS5611 (sitting on a CJMCU-117) over I²C with libopencm3 on a STM32F103C8. When I do a read, the slave sends an additional byte (0xFF) after the master has send a NACK. ...
0
votes
3answers
80 views

How should I used two MLX90614 sensor on one Arudino Uno given that the sensor has a fixed I2C bus adress? [duplicate]

I have an arduino uno and want to use a non MLX90614. I plan to used more than one sensor on the same Arduino but I don't know how to use two MLX90614 on the same I2C bus.
1
vote
0answers
180 views

Honeywell I2C RH Sensor SDA line experiencing fluctuation between Vdd and Vdd/2

I had a problem when implementing I2C communication between NXP Kinetis K50 micro-controller and Honeywell Humidlcon I2C RH sensor. The RH sensor doesn't acknowledge when receiving the default address ...
0
votes
3answers
101 views

What exactly are low speed devices? [closed]

The definition of I2C is - "A multi-master multi-slave serial bus used for communication between low-speed devices". However, I have been searching the web for a concrete explanation for this but ...
2
votes
1answer
64 views

Daisy chaining I2C modules using CAT5 and P82B715

I'm planning to connect several modules over I2C with distances between modules ranging 30-180 cm. I understand that in order to avoid the degradation of the signal due to the capacity of the ...
0
votes
1answer
75 views

I2C Pulldown Resistor

Usually pullup resistors are needed for i2c but if I have pullups in master and hosts devices and when I add another one device to I2C bus then bus stop working. I cann't remove pullups. Does it make ...
2
votes
4answers
158 views

UART expander (5 ports to 11 ports)

I have a board that I would like to design and there are 11 devices that can only be spoken to via UART. I am restricted to a Microchip uC chip product range and I have found one with 5 UART ports. I ...
0
votes
4answers
111 views

STM32F103C8T6 - I2C communication with TI FuelGauge BQ78350

I am trying to establish communication between TI BQ78350 FuelGauge and STM32F103C8T6 using I2C/SMBus. The following is the I2C configuration used for the standard HAL I2C library. ...
0
votes
1answer
60 views

i2c bus sniffing and spoofing

Some Background: I am working on an embedded c project for a samd21j18a MCU. The MCU communicates with 2 crypto eeproms on the i2c bus. All the data is encrypted with AES in CCM and additional ...
1
vote
0answers
44 views

I2C stuck on waiting for 8 cycles on DSPIC33ev128

I am new to I2C communication and after reading a number of tutorials on the protocol I attempted to interface a QMC5883L (Chinese Honeywell HMC5883L) to a Microchip DSpic 33ev128gm002 microcontroller ...
2
votes
3answers
209 views

I2C Issues - SCL is stuck high [duplicate]

I am working on a custom carrier board using a TI microcontroller as the master and an ADC IC as the slave. It appears that sometimes SCL will stay high when it shouldn't, almost like the master ...
1
vote
1answer
47 views

How does integrated displays controlled by the computer?

Consider a run off the mill pc: lcd displays connected, you have brightness control in the menu of the lcd. And some other stuff like color temp and modes. Now consider a laptop, AIOs and kiosk PCs. ...
1
vote
2answers
66 views

LCD leaking power through I2C cables

Background I have a NodeMCU and two LCD devices and an ADS1115 on one I2C bus. The LCD devices have I2C backpacks. The NodeMCU is on 5V USB power and internally operating at 3.3V. The other devices ...
2
votes
0answers
75 views

ESP8266 sleep current is higher than it should be [closed]

In short: Despite setting my datalogger IMU to SLEEP and going to deepSleep(0) on the ESP without any other IC peripherals besides the buck converter and 2 deactivated LEDs, I still measure 2.5mA ...
9
votes
4answers
977 views

Is this communication I²C?

I need to decode communication between two devices, but I have no information about these devices. All I know is that four wires are needed (GND, VCC and two wires of communication). I suspect that it ...
1
vote
0answers
53 views

ADXL343 data read

I am using a ADXL343 accelerometer in one of my designs and I am getting strange readings from the device. Just to be sure, I would like to confirm that I am formatting the data properly. (I get the ...