[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Paparazzi-devel] I2C Questions
From: |
Martin Mueller |
Subject: |
Re: [Paparazzi-devel] I2C Questions |
Date: |
Wed, 01 Dec 2010 08:41:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10 |
Hello Kurtis,
Each of these sensors uses I2C, but I am uncertain whether or not I can
use all of these sensors simultaneously through the single I2C bus on
the Tiny/TWOG.
Yes, that is possible. I2C is a true "bus" with the ability to run
several slaves (e.g. sensors) with one master (e.g. Tiny/TWOG). There is
a limit on the bandwidth that you will not reach with two devices and
all devices do need to have different adresses.
From what I can tell from the
wiki
(http://paparazzi.enac.fr/wiki/Airspeed_sensor#Making_hardware_known_to_the_Autopilot),
I can set a particular I2C address for each module:
<param name="AIRSPEED_ETS_I2C_DEV" value="i2c1"/>
However, is there a limit to how many can be used? i.e. "i2c0", "i2c1",
"i2c2", etc.
The "i2c1" is the number of the bus, not the address of the device.
Usually you would leave it to i2c0 for the Tiny/TWOG and connect your
device to I2C/J6. The new Lisa boards do have multiple I2C
buses/interfaces and you have to choose the one you connect to.
> Also, what is the parameter name for setting the ArduIMU address?
The address is defined in the device and in the driver software. For
ArduIMU it is 0x22 and defined in the Arduino code flashed to it. The
ETS is hardwired to 0xEA. As they are not equal there is no need to
change them.
Is there anything else that I need to change to get them to work together?
As for wiring, do I just connect the SDA and SCL of each sensor in
parallel with each other, or in series?
Connect all SDAs and all SCLs respectively.
http://en.wikipedia.org/wiki/I%C2%B2C#Design
Martin