Searching \ for '[EE] I2C over several boards' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/i2cs.htm?key=i2c
Search entire site for: 'I2C over several boards'.

Exact match. Not showing close matches.
PICList Thread
'[EE] I2C over several boards'
2006\10\10@010117 by alan smith

picon face
I've done some simple I2C where its just connected to a single device, but now I am looking at something a little more complicated.
 
 The entire I2C loop will have about 12 to 15 devices spread across several boards.  I am looking at using the 2:1 mux PCA9540B.  First question, anyone used these before and can they be cascaded?  The idea is to transmit to that device and then thru a second and a third...and final 4th.  I wonder if you can cascade since the control register really isnt addressed but simply told to switch or not.  So if I set the first to pass thru, and then address the second device....I wonder will that actually control the first device again, thus thinking they cannot be cascaded.  Oh, using a I2C bus extender on the output of the mux to drive to the next board.  If that doesnt pan out, then putting a small micro to take in the I2C and use it to drive the devices on the board and then buffer it out to the next board.
 
 Or is there a better way of doing this?

               
---------------------------------
All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

2006\10\10@015900 by Jinx

face picon face
> The entire I2C loop will have about 12 to 15 devices spread
> across several boards.  I am looking at using the 2:1 mux
> PCA9540B

Alan, just curious. In all the I2C stuff I've done, I've never
thought to use, or even probably needed, a mux. A current
project has many boards linked by I2C, and done purely by
master-slave addressing. What in your application requires
the mux ? I can see that the level translation would be of
some use, but apart from that......

2006\10\10@023700 by Shawn Wilton

picon face
Can you explain the application a little more thoroughly so we know why it
is you're trying to do I2C as you mention?
--

Shawn Wilton (b9 Systems)
http://b9Systems.com  <- New web page

2006\10\10@024741 by Bob Axtell

face picon face
alan smith wrote:
> I've done some simple I2C where its just connected to a single device, but now I am looking at something a little more complicated.
>    
>   The entire I2C loop will have about 12 to 15 devices spread across several boards.  I am looking at using the 2:1 mux PCA9540B.  First question, anyone used these before and can they be cascaded?  The idea is to transmit to that device and then thru a second and a third...and final 4th.  I wonder if you can cascade since the control register really isnt addressed but simply told to switch or not.  So if I set the first to pass thru, and then address the second device....I wonder will that actually control the first device again, thus thinking they cannot be cascaded.  Oh, using a I2C bus extender on the output of the mux to drive to the next board.  If that doesnt pan out, then putting a small micro to take in the I2C and use it to drive the devices on the board and then buffer it out to the next board.
>    
>   Or is there a better way of doing this?
>
>                  
> ---------------------------------
>  All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
>  
I have personally used a simple CD4052 to switch the I2C controls of
several smart switrches. Worked fine.
I switched both the SCK and SDA signals.


--Bob

2006\10\10@081935 by Vasile Surducan

face picon face
On 10/10/06, Jinx <spam_OUTjoecolquittTakeThisOuTspamclear.net.nz> wrote:
> > The entire I2C loop will have about 12 to 15 devices spread
> > across several boards.  I am looking at using the 2:1 mux
> > PCA9540B
>
> Alan, just curious. In all the I2C stuff I've done, I've never
> thought to use, or even probably needed, a mux. A current
> project has many boards linked by I2C, and done purely by
> master-slave addressing. What in your application requires
> the mux ? I can see that the level translation would be of
> some use, but apart from that......

Joe,
How you'll manage a bus with 8 DACs like MAX5382 which have only four
predefined addresses ?
:)

Vasile

2006\10\10@085406 by Jinx

face picon face

> How you'll manage a bus with 8 DACs like MAX5382 which
> have only four predefined addresses ?
> :)

Um.....

Why, I'd build my own factory that made DACs with more
addresses, that's what I'd do

If trying a mux, logic or PIC didn't work out.....

Fair question, Vasile. All my master-slave projects so far
have involved inter-connected PICs, from the big to the
small. A plain sensor or generator like a DAC doesn't always
need brains, and cost-cutting might rule in a mux/logic rather
than even a 10F or 12F router

2006\10\10@095125 by alan smith

picon face
The reeason for the mux is because the devices sitting out there are all the same...thus, they all have the same base address (can't recall the exact part number, but its a 16 bit GPIO device), so with 16 to 20 of these all on the I2C loop.....the reason for the mux.
 
 This is essentially a large control panel that has switches and LEDs all going back to a master board, that all I have from it is the I2C pins.  So using a 4066 or the like isn't possible as well.


               
---------------------------------
All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

2006\10\10@102155 by Wouter van Ooijen

face picon face
>   This is essentially a large control panel that has switches
> and LEDs all going back to a master board, that all I have
> from it is the I2C pins.  So using a 4066 or the like isn't
> possible as well.

Why not? Use one of the slaves (unqiue address) to switch your lines to
one of the sub-busses? Or use a unqiue slave to manipulate the address
pins of other slaves?

Or, if you can live with the reduced speed, use one I2C slave to
generate a SPI chain :) (Or a set of bit-banged I2C busses)

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2006\10\10@103625 by Vasile Surducan

face picon face
On 10/10/06, alan smith <.....micro_eng2KILLspamspam@spam@yahoo.com> wrote:
> The reeason for the mux is because the devices sitting out there are all the same...thus, they all have the same base address (can't recall the exact part number, but its a 16 bit GPIO device), so with 16 to 20 of these all on the I2C loop.....the reason for the mux.
>
>  This is essentially a large control panel that has switches and LEDs all going back to a master board, that all I have from it is the I2C pins.  So using a 4066 or the like isn't possible as well.

Allan,
I used PCA9540 on a DVBT board I've made, and I still remember the
company I've worked for where forced to bught 50 pcs even I need 5...
Else I liked the chip.
But I never cascaded those, the first reason I've used was the bus
level translation and the second because it has two identical tuners
and wanted to keep the addresses unchanged for those two.
So the PCA it require a first I2c bus command and then the I2C device command.
If you cascade those, you have to send first n I2C bus addresses
comand and then the I2 device command.Should work but will not be very
funny.

greetings
Vasile

>
>
>
> ---------------------------------
>  All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
> -

2006\10\10@120109 by alan smith

picon face
True, thats a potential solution.  Thank you.

Wouter van Ooijen <wouterspamKILLspamvoti.nl> wrote:  

Why not? Use one of the slaves (unqiue address) to switch your lines to
one of the sub-busses? Or use a unqiue slave to manipulate the address
pins of other slaves?

Or, if you can live with the reduced speed, use one I2C slave to
generate a SPI chain :) (Or a set of bit-banged I2C busses)

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2006\10\10@120132 by alan smith

picon face
True, thats a potential solution.  Thank you.

Wouter van Ooijen <.....wouterKILLspamspam.....voti.nl> wrote:  

Why not? Use one of the slaves (unqiue address) to switch your lines to
one of the sub-busses? Or use a unqiue slave to manipulate the address
pins of other slaves?

Or, if you can live with the reduced speed, use one I2C slave to
generate a SPI chain :) (Or a set of bit-banged I2C busses)

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu

2006\10\10@175716 by Bob Axtell

face picon face
alan smith wrote:
> The reeason for the mux is because the devices sitting out there are all the same...thus, they all have the same base address (can't recall the exact part number, but its a 16 bit GPIO device), so with 16 to 20 of these all on the I2C loop.....the reason for the mux.
>    
>   This is essentially a large control panel that has switches and LEDs all going back to a master board, that all I have from it is the I2C pins.  So using a 4066 or the like isn't possible as well.
>
>
>                  
> ---------------------------------
>  All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
>  
er, well, no, a 74HC4066 should work as well as a CD4052. Simply switch
all the other devices out, and one device
in...

--Bob

2006\10\10@182119 by alan smith

picon face
I think what I wll end up doing is putting a micro there, to give it some smarts and allow it to format the data that is going in and out.  I was going to do that on the master but since its busy doing other things, if I simply give it in a civilized format then it can use it as is  (ie...put it in a particular order..etc).  The micro sitting on each board then has a specific address of course, and then can bit bang the I2C out the other side to the devices on the board.  
 
 Using another I2C to just get the bits to turn on specific ports and allow data to flow or not flow adds a layer of latency and some complexity that I would rather keep off the board.  And since this would take two parts (I2C GPIO and a xx4066) putting one micro would reduce the parts count.

Bob Axtell <EraseMEengineerspam_OUTspamTakeThisOuTneomailbox.com> wrote:
 alan smith wrote:
> The reeason for the mux is because the devices sitting out there are all the same...thus, they all have the same base address (can't recall the exact part number, but its a 16 bit GPIO device), so with 16 to 20 of these all on the I2C loop.....the reason for the mux.
>
> This is essentially a large control panel that has switches and LEDs all going back to a master board, that all I have from it is the I2C pins. So using a 4066 or the like isn't possible as well.
>
>
>
> ---------------------------------
> All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
>
er, well, no, a 74HC4066 should work as well as a CD4052. Simply switch
all the other devices out, and one device
in...

--Bob

More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...