Stack Exchange Network

Stack Exchange network consists of 175 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
39 views

How to check the flow of assembler instructions execution?

I'm creating a project that uses I2C serial communication in assembler and I'm having some issues transmitting data and receiving back so I thought I should somehow debug the whole program, besides ...
0
votes
0answers
35 views

Check if the slave is receiving data from microcontroller and transmitting back successfully, I2C?

I have this project where I have to communicate MPR121 touch sensor keyboard with 8051 microcontroller via I2C, I've implemented the code and when I execute it I don't really know whether slave is ...
0
votes
0answers
17 views

SMBus Address and BaudRate

Hello I need to communicate with some batteries ( BT-70791CK from BrenTronics). They use SMBus ver 1.1 for communication, but in datasheet of the batteries there is no information about the SMBus ...
0
votes
0answers
53 views

Having trouble reading from registers with STM32F4 HAL_I2C libraries

I'm new to STM32 programming and am programming on a STM32F429 Microcontroller. My main goal is to integrate a Sparkfun UV sensor VEML6075 into the microcontroller as an external payload. TLDR: Tried ...
0
votes
3answers
58 views

doubt when Arduino connects to multiple i2c devices

I am using Arduino nano to drive multiple i2c devices, actually, they are premade modules which are available on eBay. ads1115 ADC, ds3231 RTC, 20x4 character LCD i2c module, at24c02 EEPROM module ...
-1
votes
0answers
54 views

Wireless I2C advice [closed]

I want to use I2C sensors with wireless. I draw a block diagram of that. Can anyone have idea or advice for this topology? Thanks. Description : Left side is my master device. It includes MCU and ...
0
votes
1answer
39 views

MAX17205 DevName reading wrong, but other default value is correct. Why?

I am using the battery fuel guage MAX17205 through I2C bus. The Device Name register that I read from it seems have a different value than what the datasheet states: I am reading a 0x2a7c, but it'...
0
votes
3answers
81 views

Choosing best bus and protocol for ~128 clients over the wire

I am up to design system with ~128 MCUs communicating to one MCU master. Communication will be bidirectional. Data will be mostly sensor reads, but I plan to use the bus also as communication method ...
0
votes
1answer
35 views

Produce and amplify analog signal with microcontroller (For PLC)

Overview I need to create an analog voltage of 0V-10V for the PLC with a microcontroller with operating voltage 5V. Approach I've been doing this research since last week. I'll share the results of ...
0
votes
0answers
27 views

STM32F103 MPR121 SPL library

I'm trying to drive an MPR121 capacitive touch sensor module. It works fine on Arduino. Here is my Arduino code: ...
1
vote
1answer
83 views

I2C Relay Circuit shorting & sparking

I'm having trouble diagnosing a faulty circuit. Here's the schematic, which is based on this instructables build. This is part of a bigger circuit, but I have tested it in isolation on a fresh board. ...
0
votes
1answer
31 views

SMBus default Baudrate and Address

I am trying to communicate with some batteries that uses SMBus. In the documens of batteries it only specifies the SMBus version which is SMBus v1.1 and do not mention about addresses nor the baudrate ...
0
votes
0answers
19 views

Circuit with DRV8825 and PCF8574 not working! Will it be a problem with the components itself?

I'm developing a circuit using a PCF8574 and a DRV8825 to control a step motor. The PCF8574 is used to control the reset, enable, sleep, modes and read the FAULT line of the DRV8825 using only the two ...
2
votes
2answers
81 views

Trouble getting I2C working on STM32 (stm32f103c8t6)

I'm starting out with I2C. I have a development board with stm32f103c8t6 to which I have connected GY-68 board with BMP180 barometric pressure sensor. Documentation of BMP180 describes Chip-id ...
5
votes
1answer
122 views

I2C Issues with First PCB

As a forewarning, this is my first PCB. I am experiencing issues with the I2C bus. There are two I2C slaves on this bus (SSD1306 display and BQ27441 Fuel gauge, currently the program only sends ...
0
votes
2answers
80 views

Medium Range Two Wire Bus Recommendations?

Do you have any recommendations for a medium range (~10 meters) two-wire bus? My supply voltage is 24V and I'll have a single master with ~50 slaves connected to it. I've looked into: I2C - Great but ...
0
votes
2answers
43 views

I2C Put One Termination Res at the End or on Each Slave Board

I Have a system with I2C bus wired just like this: My questions is which one is better: put the termination pull up res at the end of connection (on the last board), or put pull up res on each slave ...
0
votes
2answers
38 views

I2C Single Master Multiple Slave

I have a one I2C master and 14 I2C slave devices connected on the bus. I want to clarify the order of things that happen on the I2C bus. Let say the master send an ADDRESS, then all the slave ...
0
votes
0answers
41 views

COG PFC2119x driven LCD Display: Add custom characters, can get it to work

Story (skip if you want) Last week I received two malfunctioning DAB radio's from the 'brand' Tesco (type DR1551W) for free and because I cannot fix the problem with these units (missing service ...
1
vote
2answers
71 views

UART/I2C Pull up resistors

I have question regarding the pull-up resistors when UART/I2C lines are running on 2.5V and GND. Is it OK if pull up resistors are used on these lines which are connected to 3.3V or Vice versa when ...
0
votes
2answers
65 views

How to select the most appropriate (serial) bus for controller?

In the context of a robotic project where different 'payloads' and/or robotics arms (end-deflector) should be mated mechanically with power, data and control connections support, I would like to ...
8
votes
4answers
1k views

Can I put vias on routing I2C lines traces on FR4 PCB?

I am using a MSP430FR2633 micro controller and ADS122C04IPWR DAC over I2C at 100kHz. Can I route the I2C lines through vias in a 2 Layer PCB?
1
vote
1answer
103 views

USB to I2C for a beginner [closed]

I recently ordered and CJMCU-200 FT200XD a USB to I2C and I am trying to read information from a BME280 using it's I2C output. I am new to FTDI and am having some trouble finding information on how to ...
0
votes
1answer
61 views

No change in MPU6050 values when interfaced with PIC. Why?

I'm trying to interface mpu6050 module with pic16f886 microcontroller. But, i'm getting x-axis, y-axis and z-axis as 0. Why is there no change in readings even when i move my mpu? edit: This is the ...
0
votes
2answers
70 views

I2C bus isolation for dummies

Consider you have two devices designed to be I2C masters in same bus. However, only one of them is operational at a time and the other one is completely powered down. In my case the devices have ...
0
votes
0answers
57 views

STM32: I2C no dataflow after a few seconds

I have a problem with my i2c connection. After a few seconds of reading the i2c readings stopped and i can't see any SDA signals with an osilloscope. I use CUBEMX5.0.1 and in the function ...
0
votes
0answers
39 views

USART displays only half values when VCC is plugged in and repeats the same after VCC is removed [duplicate]

I'm trying to interface mpu6050 module with pic16f886 microcontroller. But, nothing's getting displayed on serial monitor. USART code works fine when used separately, but when added with the i2c and ...
0
votes
0answers
32 views

Nothing seen on serial monitor - MPU6050 with pic16f886 [duplicate]

I'm trying to interface mpu6050 module with pic16f886 microcontroller. But, nothing's getting displayed on serial monitor. Been stuck here since many days. USART code works fine. I've tried that ...
2
votes
2answers
108 views

Multiple slaves with identical address on multi-master I2C bus [duplicate]

I'm planning a hardware design, where I have a main board and multiple peripheral boards. On each of these boards is a microcontroller with I2C, which is the communication bus for the boards. The same ...
0
votes
1answer
46 views

ESP8266 + TSL2561 I2C connection

My ESP8266-01 recognises the sensor TSL2561, but the readings always output 65535 for some weird reason. But as I said, when I run the I2C scanner and plug in the ...
0
votes
1answer
66 views

Using a Dual Bidirectional I2C Bus Voltage-Level Translator

I have a module that uses this ADC powered with 3.3V (MCP3422): Datasheet Now I would like to communicate with it over I2C using an Arduino Mega. The problem is that the Arduino's I2C is operating on ...
19
votes
3answers
2k views

How to fix a PCB design mistake after manufacturing?

Newbie 16 years old here. My project is a mini robot with the pcb as the chassis, lipo battery with charger circuit, and infrared sensors. I used LSM6DS33TR for my I2C accelerometer and gyroscope ...
0
votes
1answer
64 views

What could cause 45FPS limit for SSD1306?

I'm porting U8G2 display library to ESP32 microcontroller (no suitable tag) with ESP-IDF (its official platform) as the platform, I2C protocol for now, using SSD1306 display for testing. After all ...
0
votes
1answer
22 views

How to combine 5V-powered ATmega16A and MAX44009? [duplicate]

I'm programming my ATmega16A through LPT port using uisp -dprog=bsd. Although ATmega16A supports \$V_{CC}=2.7\,\mathrm V\,..\,5.5\,\mathrm V\$, to make logical ...
1
vote
1answer
54 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
55 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 ...
1
vote
2answers
160 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
62 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
48 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
42 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
3answers
103 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
47 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
166 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
71 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
67 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 ...
0
votes
0answers
38 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
79 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
55 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
46 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. ...
1
vote
1answer
142 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.