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
1
vote
1answer
539 views

MPU9255: Unreliable AK8963 Communications

I'm currently trying to communicate with the InvenSense MPU9255 9-Axis IMU using the FreeIMU software on a Teensy3.2. See comment below for link to FreeIMU code being used (don't have enough ...
1
vote
1answer
24 views

MPU9250 IMU wearable design considerations and device address problem

I need to use 12-16 mpu9250 IMU for wearable design. Each IMU will be placed different places on the body. Therefore, I want to read data from each device by using I2C interface. However, problem is ...
0
votes
1answer
108 views

what is status code “0xC8” in an AVR TWI MCU I2C

0xC8 is called Last data byte status in Atmel's TWI's Slave transmitter mode, but what does it really mean? If TWEA==0 is for the Master receiver, then a Data byte in TWDR has been transmitted; NOT ...
1
vote
3answers
58 views

Conceptual Question regarding necessity to do level shifting

I have a circuit where a 3.3V MCU which is not 5V compatible needs to drive an MCP23017. The MCP23017 will drive and read inputs and outputs from various 74HCT components. I'm thinking that based on ...
0
votes
1answer
43 views

STM32 HAL I2C always sends 0xFF as first byte when responding to master using HAL_I2C_Slave_Transmit

I have an STM32G4 using the HAL function HAL_I2C_Slave_Transmit to respond with some data when requested by a master on the I2C bus. In the image below you can see the device sends 0xFF followed by ...
0
votes
3answers
47 views

I2C bus level shifting

I want to interface with two I2C slaves operating in different voltages. By searching around for possible solutions, I stumbled upon this AN by NXP. Although I understood everything and makes perfect ...
0
votes
2answers
162 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 ...
0
votes
1answer
33 views

I2C hold master mode Vs no hold master

Suppose to have a I2C device like Sensirion sht21, the datasheet says that the sensor supports both hold master read mode and no hold master read mode. In addition to that, suppose that the library ...
0
votes
1answer
2k views
0
votes
1answer
42 views

I2C Bus With Conflicting Pullups

I am attempting to set up an I2C bus off of a Raspberry Pi that will have two slave devices. One of these devices already has built in pullup resistors, but the other does not. Is there any way to run ...
0
votes
2answers
52 views

Bi-Directional RS-232 / RS-485 translator using MAX3162 IC [closed]

I'm trying to communicate with an I2C bus using the Serial Card in my PC (NI PCI485/8). I've created a circuit using the MAX3162 to translate from RS485 to RS232. Then I use the MAX3232 as a level ...
1
vote
1answer
74 views

i2c Pull up Resistor

I try to run an accelerometer (Data sheet) with this library (link). Bus: I2C and Microcontroller adafruit-feather-m0-adalogger (link) is used. If I wire the accelerometer to the muhC, I just get ...
2
votes
1answer
58 views

Use a single Voltage translator for multiple I2C with same voltage

Let's assume our Microcontroller is running on 3.3V and we have multiple I2c devices running on 3.3V and some on 5V. Can I use a single Voltage translator such as PCA9306 to run all 5V i2c devices, or ...
0
votes
1answer
37 views

I2C Communication in AVR

The first step in a TWI transmission is to transmit a START condition. This is done by writing a specific value into TWCR, instructing the TWI hardware to transmit a START condition. Which value to ...
0
votes
1answer
147 views

Assembler program showing ACK even with the wrong slave address, I2C code problem!

I have this project communicating MPR121 capacitive touch sensing keyboard with 8051 microcontroller, with some references I've implemented some I2C code for serial communication between master and ...
0
votes
0answers
33 views

TCA9517DR on I2C for long distance wiring with high capacitance bus

I have a CAT6 cable that was used for old temperature sensors that works with 5V I2C at 25/30 meters from the main MCU with cable pairs that brings VCC-GND-SCL-SDA. Here is the schematic: I've tried ...
0
votes
1answer
80 views

I2C communication with multiple slaves

Hi guys may I ask for your inputs on the I2C communication. I am using STM32F103C8 MCU with 2 slaves on the I2C bus. 1st slave is PCF8574 IO expander and 2nd slave is MCP4725 DAC. I'm using CubeMX to ...
1
vote
1answer
49 views

Can anyone shed light on why a I2C PCF8574 LCD driver would only be using I2C 'read' operations to 'write' to the device?

I am trying to understand a simple I2C driver for a HD44780 with soldered PCF8574 daughter board, I'm still relatively new to electronics engineering (read: 20 years out of date), but an old hand with ...
2
votes
1answer
195 views

How long of a wire and how big of a load can I have for SPI bus?

I have a system where I will connect up to 128 identical magnometer ICs up to an FPGA. I am trying to decide between SPI and I2C for comms. If I use SPI the setup will require 128 + 3 wires IF all ...
0
votes
2answers
56 views

Why is there a spec for min fall time in I2C Fast Mode?

Why is there a spec for min fall time in I2C Fast Mode but not in standard mode? Is it fine to use I2C standard mode with a fall time of 5n?
0
votes
1answer
21 views

Unexpected behavior setting non-default I2C address for HT16K33 LED Driver

The HT16K33 is an I2C controlled LED driver. The data sheet shows a standard way of setting the I2C slave address: I have implemented this circuit, but it does not work as expected. For the default ...
0
votes
1answer
56 views

How to initialize a 16x2 I2C LCD in 4-bit mode with an STM32 MCU?

As part of an alarm clock project, I am trying to interface a 16x2 I2C LCD with an STM32F103RB microcontroller. The LCD uses an I2C backpack and only utilizes D7-D4 meaning 4-bit mode must be used. ...
0
votes
0answers
33 views

STM32F103C6 hodls SCL because of RxNE set BTF set and DR hasn't been read after first data byte received (hard fault when the data is received)

I'm trying to send a dat from master to a slave (the STM32F103C6) with HAL functions, with HAL_I2C_Slave_Receive() -no interrupt mode- the reception works flawlessly but with HAL_I2C_Slave_Receive_IT()...
0
votes
1answer
85 views

Turn a dumb sensor into I2C

I’m building a device that requires 60+ serial distance sensors spread out a great distance, all communicating back to a central controller. I could go with existing I2C distance sensors, but my ...
0
votes
1answer
53 views

Troubleshooting I2C issues of ESP32-POE-ISO with LAN

i'm trying to read a I2C HTU21D from this breakout (schematics below) temperature and humidity sensor and send data to an mqtt broker. I'm using PCA9306 in order to use 5V and go "far" (30m)...
0
votes
1answer
118 views

Unknown problem with I2C on Spartan 3-E {VERILOG}

I have a Spartan 3-E board.I was using the inbuilt Xilinx SRL 16 (16 bit concatenated shift registers) for I2C communication.I verified successful implementation by displaying the number of "Acks" ...
0
votes
1answer
181 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
1answer
126 views

Simultaneous reading of multiple I2C devices with the same address

I'm a teacher of a secondary school in the Netherlands. My students are working on a sun sensor placed on a moving object, with which the attitude w.r.t the sun is determined. A couple of ambient ...
1
vote
0answers
28 views

BHI160b driver usage

i am trying to read quaternion's out of the BHI160b, that's why i purchased the BHI160b shuttle Board from Bosch. I want to connect it with my NUCLEO-L053R8 from STM. So i implemented the library into ...
0
votes
2answers
133 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
0answers
35 views

PIC16F887 I2C Master-Slave communication problem

I am trying to get 2 PIC16F887's communicate through I2C. I am aware that PIC16F887's are old but they are the only chips I have access to right now. I connected the SCL and SDA lines correctly and ...
1
vote
1answer
56 views

Determine I2C read time

I'd like to determine how fast I can read sensor values on a bus given the bus rate/bandwidth. According to the device documentation found here, assuming a 7-bit address there are 49 bits involved in ...
1
vote
2answers
575 views

ATmega16u4 and ATmega32u4 i2c bug in Proteus AVR model?

I am trying to use i2c with ATmega16u4/ATmega32u4 in Proteus (version 8.5 SP1) and in my i2c code the following code line hangs the MCU: ...
0
votes
0answers
50 views

I2C OLED does not display properly

I am using a 1.3' 128x64 OLED display bought from a site I don't remember(probably no-name), using the SSD1306 drivers, with an Arduino Nano. I have connected the SDA->A4, SCL->A5, as indicated ...
0
votes
0answers
60 views

Connection between 2 STM32F103C8 using I2C

Hello I am new to STM32 and I am trying to learn I2C communication between 2 STM32F103C8 MCUs. MCU1 acts as the master and MCU2 acts as the slave. I am using CubeMX to configure the settings however ...
1
vote
0answers
44 views

How to setup STM32 as I2C slave device?

I've been trying to set up MCU (STM32 L432KC) as an I2C slave device. I have previously tested it as a master device to interface with a port expander(MCP2307) and it works perfectly fine. The ...
0
votes
0answers
15 views

BQ51050B compatibility criteria

I started another project where I need to charge a few devices (preferably simultaneously) wirelessly. They all have BQ51050B and the corresponding coil/battery. I need to know what I should look at ...
1
vote
1answer
68 views

I2C master's output is always 255

We are using two Arduino UNOs as a master/slave for this I2C protocol. We used the first Arduino (slave) as a sensor that will input dummy data (in this case, temperature data). The Arduino (master) ...
0
votes
0answers
29 views

STM32F103C6 doesn't go out of a condition when it send data through I2C in proteus using HAL libraries

First of all, I don't have any STM32 physical device with so I'm working through simulations with Proteus and STM32CubeIDE. Following with the question: I'm simulating an STM32F103C6 as a slave and ...
0
votes
2answers
260 views

I2C Communication Between STM32F3 and SSD1306

I am trying to write data to my 128x32 OLED display. I researched it online and found that it has the SSD1306 controller connected to the display. It uses the I2C protocol and it only has 4 pins (VCC, ...
1
vote
1answer
58 views

I2C Address 0x00 not supposed to be showing up

I am currently trying to check all the sensors on my PCB with an I2C scanner to see that they all acknowledge. One of my coworkers had it over the past week and dropped it. When it was given back, ...
0
votes
3answers
169 views

I2C device lists 20mA max current on AD, CL, and DA pins. Do I need a resistor between it and Arduino?

I'm looking at the datasheet for an LED controller (the MAX6955), and it shows that all of the interface pins; clock, data, address, etc., have current maxima of either 20 or 40mA. I'm aware that the ...
0
votes
1answer
40 views

Would bypass capacitors of a voltage regulator which powers an I2C device and the bus cause issues?

I'm planning on powering a 3.3V I2C sensor and its pull up resistors with a linear LDO regulator. http://www.farnell.com/datasheets/2108564.pdf The output of the LDO aswell as the sensor's power pins ...
0
votes
1answer
52 views

Problem in editing EEPROM of MLX90614ESF sensor , pic 18f4620 , I2C communication

I want to edit Tomax and Tomin in the EEPROM 0x00h and <...
0
votes
1answer
37 views

SC18IM700 operation (RS485 to UART to I2C)

I need to create a circuit to talk to a piece of equipment using the I2C bus. I'm on a PC that has an NI serial card with RS485 ports(I'm not sure of the model number off the top of my head). I ...
1
vote
1answer
235 views

MAG3110 and MPU6050 on one I2C bus connected to a Raspberry Pi

I am trying to use separate pre-built breakout modules containing a MAG3110 (Magnetometer) (module) and a MPU6050 (gyroscope) (GY-521 module) on one I2C bus connected to a Raspberry Pi. Although both ...
0
votes
0answers
35 views

Control register of magnetometer in MPU-9250 reseting itself

I want to read magnetometer outputs from the MPU-9250 sensor (Datasheet, Register Map) but the CNTL1 Register (0x0A) of the magnetometer resets for certain values. I configured the sensor properly so ...
1
vote
2answers
705 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....
0
votes
2answers
484 views

SDA pin on I2C lines seems weird

I am trying to analyze the I2C commands sent by a PC software to R3910 DSP chip The software uses a programming box (provided by the same company that manufactures the R3910 chip) to communicate ...

1
2 3 4 5
28