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
2
votes
3answers
1k views

Use 74LCX245 level transceiver for SPI / I²C

I need to convert the levels of the SPI and I²C busses of a 5 V microntroller to a 3.3 V card reader and EEPROM memory so I chose to use the 74LCX245 since it's a bidirectional transceiver. ...
2
votes
0answers
309 views

L3G4200D Gyroscope not sending ACK

I am working on interfacing to a L3G4200D Gyroscope breakout board . I am using it in I2C mode, and the microcontroller I use is the 8051 (via bit banging). I havent connected anything to the SDO ...
11
votes
2answers
830 views

I2C level shifting

I am currently designing a circuit that can record data from a sensor and save the data recorded into an EEPROM. My two devices (EEPROM and for testing purpose a RTC) are connected via an I2C bus to a ...
4
votes
4answers
4k views

At what point does crosstalk on I2C become a problem?

If I have a pair of I2C traces (SDA and SCL) on a 1 oz board, each being 8mil wide and separated by an 8mil gap, how long would the traces have to be before crosstalk would become an issue? Edit: ...
11
votes
7answers
15k views

I2C slave address not acknowledged (sometimes)

I'm trying to communicate with a remotely connected FRAM (FM24C04 from Ramtron) by using I2C. This memory is embedded on a board that can be inserted and removed at any time to/from the system (...
4
votes
4answers
2k views

Implementing an I2C buffer in C

I'm implementing a read-only I2C slave on a PIC18F4620. I have made a -working- ISR handler for the MSSP module: ...
5
votes
2answers
19k views

I2C pull-up resistors calculation & where to place them [duplicate]

I'm connecting a PIC18F46K22 (master) to a PIC18F4620 (slave) using I2C. The wire between the devices is ~30cm. I'm using 400kHz without slew rate control. Later on, I'll add another 18F4620 on ~5cm ...
10
votes
1answer
7k views

What is slew rate for I2C?

I'm configuring I2C on a PIC18 using the built-in functions of the C18 compiler as described in section 2.4 of the documentation: ...
1
vote
1answer
360 views

DS1077 to drive a PIC's clock

I found the DS1077, a "dual-output, programmable, fixed-frequency oscillator". I was wondering if it would be possible to let this chip provide the clock signal for the PIC(18F46K22) that operates the ...
1
vote
1answer
972 views

I2C with DS1307 hang after end of transmission

I've got a home brewed RTC with DS1307. I've put two pullup resistors on SDA and SCL lines, connected them to the Arduino 5 and 6 pin respectively. I've also provided a backup battery since I read ...
1
vote
1answer
3k views

Cheapest AVR With Built in I2C Support

I'm looking to build a pretty basic project that relies on several submodules that use I2C for communication. I'm trying to find the smallest, cheapest AVR device that supports I2C. I know the 328P ...
2
votes
0answers
2k views

Level shifting with BSS138 - weird values

I need to connect 5V and 3.3V devices via I2C as follows: I've connected 3.3V and 5V pull-ups and tried to measure the voltage. There is 5V on HV and TX_HV but 4,7V on LV / TX_LV. Putting TX to LOW ...
0
votes
1answer
171 views

understanding how to set values when using all 8 bits from one address plus the next 2 of the next address

I hope that I am phrasing this correctly but here goes. I have been building a service for MSRDS to run my prototype board. People have probably seen me ask questions about this before. I have been ...
0
votes
3answers
1k views

I2C temp sensor and an Arduino wifi shield not working together

I am using an arduino wifi shield and a TMP102 with an arduino uno rev2. With boards older than rev3 you have to add a jumper from the 3.3V to the IOREF pin for the wifi shield, see here: http://...
6
votes
2answers
233 views

Help to identify unknown Sync Serial Bus

Has anyone seen a sync serial bus communication like this? Repeated Pattern : Detail of beginning : Personally, I haven't been able to figure it out myself... It seems like I2C, however: The ...
1
vote
1answer
920 views

I2C maximum bus speed calculation

This question is based on the Philips I2C specification UM10204.They gave (section 7.2.1, page 56) for calculating the maximum frequency of the bus: $$F_{max}=\frac{1}{T_{low(min)}+T_{high(min)}+T_{...
1
vote
1answer
426 views

TCA9555 Analog I/O

I understand that the TCA955 is an I/O extender that communicates via a I2C bus. What I can't figure out is whether this chip will take analog inputs as well as digital inputs. I'm trying to add more ...
12
votes
5answers
3k views

Is I2C mixed frequency possible?

Suppose we have a 400 kHz I2C bus. There is one master and a bunch of slave devices. We would like to introduce one more slave device, but unfortunately it only goes to 100 kHz . Clearly, the solid ...
0
votes
4answers
2k views

Converting two's complement hex values to binary?

I'm reading x-axis accelerometer data from an IC via the I2C bus using I2C-Tools ( specifically i2cget ) in Linux. Here is the code that is reading these values: <...
5
votes
1answer
3k views

Best way to communicate Raspberry Pi and ATTiny13

What is best way to connect two or three microcontrollers, ATTiny13 to Raspberry-Pi and get master (Raspberry Pi) communication? Are there any ready libraries for ATTiny13 for SPI or I2C? Maybe some ...
1
vote
2answers
993 views

I2C with PIC32 and MCP4706 Not Working

We're working on a battery charger for an electric bicycle at the moment, but prototyping with a PIC32MX695F512H kit board and an MCP4706 DAC soldered onto a breakout board, programmed using a PICKIT3....
0
votes
1answer
364 views

I2C on explorer 16 board not working

I am using the Explorer 16 Board for building a Accel connected by I2C . Currently I have only the I2C part done and I am trying to tap scl1 & sda1 using oscilloscope. The accel has to connected ...
1
vote
1answer
2k views

Bit Bang to I2C EEPROM MSP430

I found some code to Bit Bang to an EEPROM on the MSP430 here, but if I change the pins to what is on my design it fails to read and write. I've also added a LED for output this should blink if it ...
6
votes
3answers
441 views

i2c external pullup kills communication

I am using an MCP23017 (which shouldn't matter tho) to extend the number of GPIO pins of an arm based linux computer using i2c-dev bitbanging. It all works fine with wires of a few centimetres. The ...
5
votes
1answer
3k views

i2c bus capacitance

It is given in philips i2c specification that maximum number of devices connected to the bus is limited by bus capacitance.There is formula specified for pull up resistor but there is no formula to ...
3
votes
2answers
224 views

i2c bus electrical specification

Rise time and Fall time of both SDA and SCL signals are given as 20 + 0.1Cb ns in I2C bus fast mode electrical specifications version 2.1. Cb is bus capacitance and units in picofarad. How do the ...
2
votes
2answers
1k views

Sync 12 Arduinos - I2C vs Serial

I've been given 12 arduinos (Mega) and 12 breakout boards (custom built. they pump up the output of the digital pins to 12v @120mA) to control around 300 LEDs. I'm using a pseudo PWM library to fade ...
1
vote
2answers
572 views

Two MinIMU-9 v2 with LPCxpresso, or Arduino Uno/Mega

I am working on a project that interfaces two IMU sensors to one microprocessor (NXP LPCxpresso). The purpose is to read both of gyro and accelero at two different place on the bodies. I have ...
2
votes
1answer
765 views

TLC59116F (i2c led driver) everything seems ok but LED doesn't work

I'm trying the LED driver TLC59116F with an arduino UNO R3. This IC is a i2c controllable LED driver with PWM and 16 outputs. The registers seem all loaded fine, here's a print of their contents: <...
5
votes
1answer
499 views

i2c on different logic level devices

I'm having a problem making LPC2148 work with SRF10 sensor. LPC is 3.3v device with 5v compatible i2c (at least user docu claims that). On the other side there is SRF10 device which is 5v. I have ...
3
votes
3answers
1k views

Generation of text on composite video

I'm building a homebrew computer. I want some way to get video out, preferably along the lines of 80x25 text. I'm not interested in framebuffer graphics. Does such a thing exist as a single-chip text ...
3
votes
2answers
2k views

Setting up an ATtiny45 as I2C master - SCL toggles low, but refuses to toggle high

Another pin, another question: However closely related to Setting up an ATtiny45 as I2C master - SDA stuck low this is different question. I'm trying to control a DAC from an ATtiny45, but somehow ...
4
votes
3answers
5k views

I2C: Is a repeated start between different slave addresses legal?

I'm writing I²C code for an application where I have only one master, but several slaves. In all the datasheets I've read (not only for this project), the repeated start condition is only used to ...
2
votes
1answer
1k views

Setting up an ATtiny45 as I2C master - SDA stuck low

I'm trying to control a DAC from an ATtiny45, but somehow the SDA line is stuck low. To find the problem in the code I did the following: I simplified the circuit to only the controller with the pull ...
10
votes
4answers
8k views

I2C read/write failure under heavy interrupt load

In my system, I am using I2C and I realize under heavy interrupt load (from other sources), I2C communication is easily disrupted. Is this expected behavior for I2C? I would have expected despite ...
5
votes
3answers
2k views

DS1307-breakout-board

I want to build an RTC clock for the Raspberry Pi. Adafruit has a guide to accomplish this with Dallas DS1307. On the schematic they put a 2.2K resistor between VCC and SCL and do the same for VCC and ...
2
votes
3answers
349 views

I2C? Any good tutorials out there?

I have been having a very hard time understanding what a I2C bus is. I would really like some help in understanding what this is. This is a very broad and a very extensive topic that you could go on ...
4
votes
5answers
15k views

Establishing a proper TWI/I2C communication between a pair of Atmega32

I am a mechanical engineer with the desire of learning electronics stuff. I am working on these days at learning the TWI(I2C) communication in Atmega32. With a lot of internet search I have managed ...
10
votes
2answers
10k views

I2C pullup resistor calculations

I am trying to drive this I2C LCD display with an ATxmega16A4U microcontroller. Both devices are listed to work with I2C clock frequencies up to 400 kHz. The two devices are the only devices on the ...
2
votes
3answers
4k views

SMBus with AVR?

I'm looking at using some sensors that have an SMBus interface. The signaling looks an awful lot like I2C. What are the main differences between I2C and SMBus? Can the TWI hardware of an AVR talk to ...
3
votes
2answers
2k views

I2C Capacitance

I'm using an I2C interface for my e-compass and controller. The capacitance of the e-compass I2C pin is 20pF, and that of the I2C controller is approximately 40pF. But the problem is: I want to use a ...
4
votes
4answers
4k views

Two wire vs. three wire serial interface for RTC

I'm looking to choose an RTC for a project I have in mind. I have the following options (linked to datasheet): DS1307 DS1302 The main difference seems to be the communication protocol. The DS1307 ...
8
votes
3answers
44k views

Starting with I2C on PIC18s

For a project I'd like three PICs (two slaves PIC18F4620, one master PIC18F46K22) to communicate over the I2C bus. Later on, more slaves may be added (like EEPROM, SRAM, ...). I'm writing the code for ...
1
vote
1answer
530 views

I2C on FFC or IDE cable - interference?

This is a follow-up question on this answer. I need to communicate with I2C over approximately 10cm and I'd like to use an FFC or IDE cable for that. Earlier, I used an FFC cable to link a segment ...
2
votes
1answer
284 views

DS3232M Skips seconds when writing to SRAM

I'm using a DS3232M that works great for keeping track of the time until I try to write to the SRAM on the chip. When I use the SRAM it slows the updates of the seconds register or stops them all ...
5
votes
2answers
2k views

MOSFET and clamp on I2C interface lines as level tranlastor

I'm trying to understand what's going on in this circuit: I understand the master direction. I2C lines usually are pulled up by default, so when the line is high or idle, the GS voltage < 0.7V, ...
2
votes
1answer
3k views

Multiple masters for i2c device

I have a DS1307 RTC chip that I want to interface with multiple masters. One, an ATMega chip, will only ever really need to pull time data from the chip and the other (probably just an ATTiny) will ...
2
votes
4answers
3k views

I2C combining read and write operation

I'm designing my own data protocol for communication between PICs, ICs, etc. and in the specification I'd like to compare it to the existing I2C protocol. There are two types of operation on the I2C ...