Hi, I am using the i2c bus for connecting an I/O expander (MCP23017). I am using 2 IC's and made appropriate changes in the kernel for i2c bus detection. I followed the link https://github.com/scottellis/overo-mcp23017 and programmed my IC. I am facing a strange issue. When I connect the IC in breadboard it works fine all the time. But when I put it in a dot board it sometimes detects only one IC. Sometimes it detects both. There are no soldering issues. And accidentally I found a weird issue. When I try to measure the voltage on the SCL pin with multimeter, the two IC's got detected. I tried to repeat the same scenario all the time. When I connect the multimeter the two IC's are detecting without any issues. I don't know what this infers? Can someone give me any ideas? Do I need any pull ups? (In the schematic SDA and SCL are already pulled up) - Neo
Strange issue in I2C bus in mini2440
Update: No need to measure the voltage. When I just keep the multimeter's probe in either SCL or SDA it got detected. Any ideas on how to solve this? :( - Neo
The lines are already pulled up in the board. While searching for this strange problem someone mentioned in a post that one has to use pull ups for each and every I2C device that is connected to the bus. Isn't that optional? I tried to connect the lines with an 8.2k pull up resistor but found no improvement in the detection of IC. When speaking with one of my friend, he mentioned that you are missing some terminal impedance (considering the SDA and SCL lines are transmission lines). I am totally confused. - Neo
strange, i saw the same bahavior on a 1-wire bus with 1 dallas temperature sensors with a 30m cable. unfortually i dont´understand a lot about all this electronic(pull-up/impadance etc..) stuff a friend of me is soldering up a relayboard with i2c for me, so, the same problems still waiting for me. does any other guys here using i2c without any problems? regards rudolf
Sorry, I didn't understand: Do I need any pull ups? (In the schematic SDA and SCL are already pulled up) Perhaps an idea is to attach the schematic. As far as I am aware the lines between devices should be short, so one does not have to consider termination impedances for the pcb track or wires. I doubt very much that your multimeter provides any "termination" for these interconnect lines. I would go to the MAXIM site and read some of their application notes on I2C devices . . . they call them 2 wire devices. For example, http://www.maxim-ic.com/datasheet/index.mvp/id/2480/t/al and download the datasheet. I couldn't find any application notes on using 2-wire devices, which surprises me. It must be hidden somewhere. I'll check back on your progress. Good luck, Dave
Actually, a more useful resource would be: www.avrfreaks.net Throw in <I2C> in their search facility and sit back and read through the 3689 hits. Also, look up one of their datasheets . . . say the ATmega32. They have very good documentation on using their "Two wire serial interface".
BTW, only one set of pull-ups are required. *** But when I put it in a dot board it sometimes detects only one IC. *** dot board?
I am facing the same problem, sometimes there is no acknowledge from the I2C device and the S3C2440 can't identify the device. Reducing the speed didn't solve the problem. Maybe shorter bus lines might be useful, but I can't test it. Is it possible to add additional pull-up resistors? One set of 10kOhm on the board means 0.33mA, that should not be the limit.
For Atmel AVR ATmega series I have one board with 1K5s and another 4K7. The mini2440 schematic show 10K pull-ups. I would expect that 10K is good enough. I'll check at work in a few hours. Dave
@davef: I mentioned the general PCB board as dot board. And Should each I2C slave connected on the bus need dedicated pull ups. I see a voltage drop in my I2C IC's SCL and SDA lines. @Mathias:For me the additional pull ups didn't solve the problem. I used 8.2k pull up. which I2c device you are using?
quote: BTW, only one set of pull-ups are required. How are you connecting these I2C devices to the master? Ribbon cable, just individual wires, PCB tracks or ? How long are they? For example, in our product there is about 100mm ribbon cable and pcb tracks maybe 100mm long and low speed had to be used with about 1K resistors to meet the requirements as shown in the datasheet I attached. Could you point me to the I2C library you are using? Are you setting the address lines on each device to an unique address? Can you attach a photo of what you have done?
The I2C library I am using is s3c2410-i2c. I am connecting it with individual wires.( I have done the same way is bread board. It worked). The length would be around 15-20 cms. The I2C spec detects devices till 100cms. So that shouldn't be a problem. Now I took a new PCB board and soldered it again. I used RMC connectors for all the pins. Now everything is working fine. May be the not working case could have had some soldering issues. I couldn't come to a clear conclusion why that isn't working. - Neo
It would be helpful to know what the original problem, but sometimes we just have to "move on" and see if the problem re-surfaces. Temperature and voltage extremes testing together with EMC and EMI testing for Type Approval quite often highlight these problems. Good luck!