• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I2C same devices on single bus

Status
Not open for further replies.

martinmoen

New Member
In the spec sheet of the device I am looking it, it only gives three addresses so I am guessing I can only use three at a time on a single bus?
 

martinmoen

New Member
It gives three address. Not three pins. Only one pin for the address
The address pin can be set to low,floating,high
 

martinmoen

New Member
It's a line following robot, it's for a second year project. I want to take a slightly different approach than using the old photodiode or LDR method. I wanted to see how much light was being reflected off the surface and actually create PID controller using a PIC 16F or 18F
 
of course if you do need more you could use a small pic chip which has i2c capibilitys and connect it to the big chip via software uart for 2 i2c busses
 
Last edited:

blueroomelectronics

Well-Known Member
It's also likely to be a little slower than a phototransistor. You'll have to constantly poll the devices, this will tie up your MCU & I2C bus.
 

DirtyLude

Well-Known Member
You can connect your the photodiodes to an ADC and get light level as well. That's all this chip is doing.
 

RCinFLA

Well-Known Member
I assume this is a standard 400kbps I2C. Typically any given I.C. allows only a few address selection.

You can use some of the GPIO's to create chip selects to further select devices that become active on the I2C bus. Many I2C device have an additional chip select pin to facilitate this. If not you can add a AND gate to the data lines to mute the reception to a given chip.
 

Pommie

Well-Known Member
Most Helpful Member
Another approach to getting a value that represents the line position is to use multiple LEDs and photo detectors in a line. By illuminating each LED in turn and reading the 3 sensors near it you can calculate the line position. This will also be faster than using I²C.

See how they are arranged on this one. This arrangement should give you a value of ±5.

Mike.
 
Last edited:
Status
Not open for further replies.

EE World Online Articles

Loading
Top