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
1answer
1k views

I2C Issue at 400KHz

I am having two boards(1.5Feet x 1Feet each) which are connected in a backplane. I2C master is in BOARD1 and the slave(Temperature Sensor) in BOARD2. In 100KHz mode, I am able to read the slave ...
1
vote
1answer
495 views

i2c problem on LPC2148

I have problem with getting my LPC2148 to work with i2c devices. LPC is on 3.3v bus and i2c devices are on 5v bus with pull-up of 3k6 ohm on either 3.3v or 5v (jumper selection). What im experiencing ...
4
votes
3answers
467 views

I2C wiring help

I have 64 i2c devices wired together. They all seem to work correctly until randomly between 30s-1m of sending signals, the bus will hang. Here is how I have it wired: It's currently wired as ...
5
votes
1answer
828 views

I2C device doesn't sink enough current

Im working on a display project and have run into some I2C issues. The display is of 3.3V design, so I figured, no big deal, ill use a level shifter and be on my merry way. Well, sure enough the level ...
2
votes
1answer
2k views

How to shift cursor of a ST7032i based LCD?

I am using a MIDAS MCCOG21605B6W, I2C interfaced, COG type LCD. I am also using a PIC16F616 microcontroller to interface it and I am bit-banging the I2C protocol. I can initialize the LCD, write to ...
7
votes
4answers
8k views

DS1307 power failure problem

The DS1307 has two power sources: the main VCC source and the backup battery. The latter will power the DS1307 when the main power goes down so the clock can keep ticking. I am facing a problem with ...
2
votes
3answers
2k views

Can I use I2C bus or GPIOs as I2C to connect I2C devices?

This question is regarding use of I2C Bus/GPIOs as I2C. My application processor has three I2C controllers. Is it preferable to connect all I2C devices (obviously we can not connect more than 128 ...
26
votes
3answers
28k views

What is difference between I2C and TWI?

What is difference between I2C and TWI interfaces? Wikipedia says, that TWI is variant of I2C. Some other sources says that only name is differ...
4
votes
1answer
1k views

Strange I2C Behaviour

I'm currently trying to re-use some hw from an old project which happens to have the correct ICs I need for a prototype, but the engineer that designed it has left, so i'm essentially now reverse ...
5
votes
2answers
8k views

Can I directly interface to 5V I2C devices with an STM32 running on 1.8V?

STM32 I/O pins are 5V-tolerant. I2C devices use open-drain outputs. I currently see no problem with operating an I2C bus with 5V devices from a 1.8V STM32 (with pullups to 5V). Is my understanding ...
4
votes
3answers
2k views

I2C EEPROM with non-standard address?

So I know that almost all i2c EEPROM ICs use 0xAh (or 1010) as the top four bits of the slave address. I currently have a 16 kbit EEPROM on my i2c bus that uses the lower 3 bits of the slave address ...
5
votes
4answers
4k views

I2C and SPI ,if they share same connection , is there confilict or not

We have a product which uses PIC18F4520, and we used some devices like LCD driver and so on, that all use I2C bus to comunicate with the micro. But now we want to add a couple of AD5504, which is a ...
1
vote
1answer
431 views

I2C Communication Speed across Sensors

I'm curious as to how fast I can communicate between multiple sensors. I have a board with an adxl345 digital accelerometer and an itg3200 3-axis MEMS gyro on I2C. I'm trying to build an IMU which ...
1
vote
3answers
3k views

Debugging I2C bus using an oscilloscope

Is it possible to debug an I2C bus effectivaly with a two channel (plus an external trigger) oscilloscope? I've been trying to do it, to catch a single transaction starting from the start until the ...
6
votes
1answer
1k views

LCD modules with I2C or SPI interface [closed]

I would like to add an LCD to my current design (a project that is to be produced in low volume, around 50 to 100 units). A small display size (around 8 or 16 characters) should be plenty since it is ...
0
votes
1answer
2k views

Android to I2C Control

I have an I2C device that I would like to interface with Android. It seems that the easiest way would be to use a microcontroller compatible with Accessory Development Kit. But these kits and their ...
2
votes
3answers
1k views

I2C - Where's the ACK

I'm working on I2C master driver for interfacing a particular peripheral. The problem I have, is that when the 9th clock arrives, the slave device doesn't pull down the SDA line. I checked the ...
2
votes
2answers
1k views

PIC18F2550 I2C Open Drain?

As far as I have read, the I2C pins are Open Drain or Open collector, but in the PIC18F2550 the datasheet doesnt say anything about those pins, and even says they are a digital output if you select ...
0
votes
2answers
728 views

I2C Pulldown and Pullup…is it possible?

I am using a PIC18F2550 to control a H Bridge, and I am using several input signals, such as RS-232, I2C and Analog 0-5V to make the final PWM output for the H bridge. I have a problem with PCB space, ...
16
votes
7answers
11k views

Is there any definitive I2C pin-out guidance out there? Not looking for a “STANDARD”

EDIT: This has been repeated several times, so putting it on top: Yes, it is well known that there is no "standard" for I2C inter-device connectors, but surely this community can formulate a list of "...
5
votes
2answers
2k views

Multiplexing an I2C bus between two masters on a Xilinx FPGA

I have a single external I2C bus (SDA and SCL pins). This is currently controlled by a third-party IP core which provided "implicit" inout ports in the MPD, specifically: ...
3
votes
1answer
969 views

USB I2C adapter and Cognimem on Mac OS X?

I am a newbie when it comes to electronics, but because of some things I'm being exposed to at work, I've grown a bit of an interest. I was given a Cognimem CM1K chip on a board, which is essentially ...
0
votes
1answer
3k views

I2C level shifting and protection

I am interfacing an MCU (CC1110) with Vdd of 3.3 V to a battery gauge IC (BQ27510-G2) with Vdd of 2.5 V. Currently, I am pulling the bus up to 3.3 V with a circuit that I blindly copied from a ...
0
votes
2answers
963 views

How to test an atmega (arduino) i2c network

First of all sorry for my bad English and for this "theoretical" question on how is the best way to do things. I'm just out from university and no-one ever told me how problems can be resolved in a ...
1
vote
1answer
2k views

communication between 2 arduino crash when external power supply is plugged

i have one arduino mega that communicates with one arduino leonardo. the leonardo controls some motors (mega tell to the leonardo how many step to do... leonardo is a coprocessor for the motor in ...
2
votes
4answers
4k views

ATTiny25/45/85 as I2C master AND slave

I'm still trying to wrap my head around I2C as well as the ATTiny. I've found plenty of tutorials on how to use the tiny as an I2C slave as well as master, but is it possible to use it as both at the ...
0
votes
1answer
139 views

Keep SPI/TWI master active?

I'm designing a data recorder application which uses an 8-bit AVR microcontroller. It uses the TWI and SPI interfaces with the microcontroller being the master. There is one SPI device, a microSD card,...
5
votes
2answers
3k views

PIC32 I2C not operating as expected

I'm having a problem getting I2C running with a PIC32MX795F512L. It was not acknowledging the address byte being sent out, so I put a logic analyzer on SDA and SCL and got the trace shown below: The ...
2
votes
1answer
1k views

Multiple 4-Digit 7 Segment Displays with Arduino

I have 3, 4-Digit 7-Segment Displays from Adafruit, and the included docs/ libraries say I should connect the display to pins A4 & A5. However, I have three of the displays, so I am looking for a ...
4
votes
1answer
494 views

Can't read written data out of 24AA1025

I've got a PIC18F with MSSP that I'm interfacing with a 24AA1025. I'm using MPLAB 8 and the functions from C18 to make my life easier. The only problem is that I've (supposedly) written a byte to ...
4
votes
3answers
17k views

What is the simplest way to interact with an I2C peripheral?

I have an I2C peripheral that I need to interact with using a Windows 7 PC. The interaction could be through a terminal emulator, or any program that can produce a real-time log that I can process ...
2
votes
1answer
4k views

Not getting any reading from FTDI UMFT201XB USB-to-I2C module

I got the FTDI UMFT201XB USB-to-I2C module in order to interface with an I2C peripheral through a USB port on my Windows 7 computer. The VCP drivers seem to install correctly, and a COM port is ...
-3
votes
1answer
2k views

Interface microcontroller as i2c slave

How do I configure an I2C enabled microcontroller (NXP P89LPC9321) as a slave for the I2C enabled master? I have done some study on I2C interface. Please throw some light on this, preferably some ...
0
votes
2answers
892 views

i2c bus isolation using Si8400

I am currently working on optical isolation of the i2c bus in order to remove the risk of damaging the PI from outside noise. I am using Si8400 optical isolator but I was so far unable to make it ...
1
vote
2answers
634 views

Weird readings from ITG3200 gyro?

I am having trouble making this gyroscope to work. I can sort of get Z axis readings from it. If I don't move it, the X and Y axises constantly display -1. When I move the gyro, the X and Y would jump ...
1
vote
4answers
6k views

I2C optocoupler separation - which IC?

I am designing a circuit which will have some external I2C sensors connected to it and thus I want to protect it from noise - via an optocoupler. I have to say that I am a complete novice to this all ...
9
votes
5answers
2k views

I2C EEPROM bit-banging: Writes fine, but only if first bit is not set

I am currently working on an I2C EEPROM project using bit-banging to drive the SDA and SCL lines. My read function works fine but whenever I write any byte with a leading "1", I always read FF back; ...
8
votes
5answers
28k views

multiple arduino communication (1 master, n slaves)

I would like to develop a master/slave network that consists of: 1 Arduino master that reads sensors and generates velocity ramp profiles based on the sensor signals and then sends those ramps to ...
1
vote
2answers
737 views

PIC16F SSPADD Causing SCL To Go Low Early

I am not able to communicate with my RTC (PCF8563). I am trying to communicate with it using a PIC16F876 over the I2C bus. The code below is all I am doing in my main(). I am unable to receive an ACK ...
2
votes
2answers
2k views

Radio interferes with I2C bus communication

I have a PCB with a Microchip PIC18F97J60 on it and every time I key a 5 watt radio transmitting at 144 Mhz next to the board it resets the processor. The processor resets when it’s attempting to ...
3
votes
1answer
2k views

Problem writing to MCP23017 I/O Expander registers (i2c)

I am creating a basic cable tester device and using I2C to interface with two MCP23017 I/O expander chips. In my code each MCP23017 slave has its own address and I can communicate with both of them ...
7
votes
1answer
2k views

Difficulties of I2C over wire

I want to link a PIC16F1825 and a TCN75 temperature sensor via I2C. The temperature sensor is about 1m from the MCU. Can somebody enlighten me on whether and what kind of difficulties I am going to ...
12
votes
3answers
16k views

I2C minimum clock speed and reliability

Is there a minimum clock rate specified by I2C? I know the most widely used clock rate is 100kHz and there is a "fast" mode of 400kHz supported by some devices, and a faster yet mode supported by ...
3
votes
2answers
1k views

Arduino to CPLD to toggle an LEDs using I2C

I have a a CPLD (Lattice MachXO2) that echos a signal from an Arduino to turn on an LED. Arduino: ...
8
votes
2answers
472 views

Designing my own Bus

This question is further to my previous question: Alternatives to SPI because of EMI. I am toying with the idea of designing my own communication bus. I would be grateful if someone could cast their ...
12
votes
3answers
20k views

I2C: 3.3V and 5V devices without level-shifting on 3.3V-bus?

do I really need a level-shifter if I use 5V-powered devices on an I2C-bus that has pull-ups to 3.3V? In my understanding the devices will only pull the lines (SDA, SCL) low (to ground) and never ...
11
votes
1answer
2k views

BMA180 accelerometer. How does it manage to share pins between I2C and SPI?

BMA180 accelerometer can be either SPI slave or I2C slave. The pins for both buses are shared. ...
6
votes
3answers
6k views

I2C extender or repeater?

I am developing a dolly-pan-tilt system, where an Arduino is connected via I2C to three independent rotary encoders for positioning. Having read a few posts on this site and elsewhere, I am aware that ...
4
votes
3answers
3k views

How to convert a TowerPro 18A MAG8 (HH30A_V1.1) Electronic Speed Control (ESC) from PWM to I2C?

A while ago, I purchased four of these ESCs to use them for the control of brushless motors. Now I need to know how to convert them from PWM to I2C. I'm not a electrical engineer, so I don't know ...
0
votes
2answers
6k views

LCD Programming with Arduino

I'm trying to get my LCD to display "Voltage= (variable)". I have it programmed to write the text and I have a pot wired to my arduino and I'm trying to get a voltage number to come after the equals ...