I think this is the right subforum for this question. If there is a more appropriate, please let me know.
I'm working with two break out boards that both use i2c: Adafruit's MPR121 breakout & Sparkfun's si4703 FM Receiver: Links below. Looking at the documentation, they shouldn't have a conflicting address. MPR121 : 0x5a & si4703 : 0x10(found in the header for the libary).
Individually, each breakout works great and their test programs load and run.
When I try to connect the clock line and the data lines together (note, si4703 calls the data line SDIO & MPR121 calls it SDA) I cannot get either to work. Even if I run the test program for one but don't power the other I don't get any reads. One thing I've noticed is that the convenience LED for IRQ on the adafruit MPR121 board will go solid.
I've been totally baffled by this. This is the first time I've worked with i2c. It seems pretty straight forward. From reading different forum posts, I think this might be an issue with pull up resistors, but I thought this was handled internally by the arduino.
Any help or pointers to things to read about would be appreciated.
I think this is the right subforum for this question. If there is a more appropriate, please let me know.
I'm working with two break out boards that both use i2c: Adafruit's MPR121 breakout & Sparkfun's si4703 FM Receiver: Links below. Looking at the documentation, they shouldn't have a conflicting address. MPR121 : 0x5a & si4703 : 0x10(found in the header for the libary).
Individually, each breakout works great and their test programs load and run.
When I try to connect the clock line and the data lines together (note, si4703 calls the data line SDIO & MPR121 calls it SDA) I cannot get either to work. Even if I run the test program for one but don't power the other I don't get any reads. One thing I've noticed is that the convenience LED for IRQ on the adafruit MPR121 board will go solid.
I've been totally baffled by this. This is the first time I've worked with i2c. It seems pretty straight forward. From reading different forum posts, I think this might be an issue with pull up resistors, but I thought this was handled internally by the arduino.
Any help or pointers to things to read about would be appreciated.
chucktodd:
Post the smallest chunk of code that reproduces your failure.
Post a schematic of how you have connected the devices.
Without this info, no one will be able to diagnose your failure.
If you want my guess; you are missing a semicolon?
Chuck.
I haven't modified the example code for either of the breakout boards or from the simple wiring in the hook up guides (A4-Data, A5-Clock, 3.3v & Gnd). Since the code comes from adafruit or sparkfun I'm assuming it is pretty well vetted.
The only thing I've done is connect the data/clock lines of one to the data/clock lines of the other.
tatagatha:
I haven't modified the example code for either of the breakout boards or from the simple wiring in the hook up guides (A4-Data, A5-Clock, 3.3v & Gnd). Since the code comes from adafruit or sparkfun I'm assuming it is pretty well vetted.
The only thing I've done is connect the data/clock lines of one to the data/clock lines of the other.
Well,
It sounds like it should work, So, therefore It must work. Because, the code works and the hardware works. It all works.
chucktodd:
Well,
It sounds like it should work, So, therefore It must work. Because, the code works and the hardware works. It all works.
So, no problem? Right?
I still think there are some semicolons missing?
Chuck.
I'm not trying to be obstinate by not providing code inline to the forum or schematic that I'm using. The code is the exact libraries and example code provide from adafruit or sparkfun and the wiring suggested in the both their guides(Which i linked to). I was hoping that someone might key in on conditions where connecting the clock and data lines of the two systems might not work for reasons other than address conflict. Or that someone had specific experience with the two modules. Or just general input on conditions that can make an i2c bus fail.
tatagatha:
I was hoping that someone might key in on conditions where connecting the clock and data lines of the two systems might not work for reasons other than address conflict. Or that someone had specific experience with the two modules. Or just general input on conditions that can make an i2c bus fail.
I haven't tried to put together my own FM radio based on the Sparkfun Si4703 Tuner Evaluation Board yet. When I do, I am planning to use a second I2C device, the Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack. I'm not that familiar with the wire.h library, but when you have two devices hanging on the I2C bus, don't you have to address them explicitly, unlike when you only have a single device on the bus?
JRThro:
I haven't tried to put together my own FM radio based on the Sparkfun Si4703 Tuner Evaluation Board yet. When I do, I am planning to use a second I2C device, the Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack. I'm not that familiar with the wire.h library, but when you have two devices hanging on the I2C bus, don't you have to address them explicitly, unlike when you only have a single device on the bus?
Every device on the I2C bus (except the master device) has a unique address.
As long as the correct pullup resistance is used ~4.7k for 5V, 1k for 3.3V. And the bus capacitance is low enough (wires short, less than 1m total length). It will work.
I have used I2C with 15 different slave device with not problems.
What seems strange to me is that all of the example code that I've seen, even though it includes wire.h, does not seem to use any of the wire functions to communicate by I2C with the Sparkfun Si4703 Evaluation Board.
JRThro:
What seems strange to me is that all of the example code that I've seen, even though it includes wire.h, does not seem to use any of the wire functions to communicate by I2C with the Sparkfun Si4703 Evaluation Board.
What am I missing?
You are only looking at the example code correct?
Do you see that first line of the Example code:
#include <Si4703_Breakout.h>
SparkFun wrote a library that contains all of the I2C function calls.
Open up their library Si4703_Breakout.ccp.