EmbeddedRelated.com
Forums

[at91sam7x-ek] more TWI?

Started by dawido85 July 21, 2008
Hi,
I'm wondering, if it's possible to implement more than one TWI
interface? Can I use predefined registers? Can I control more then one
peripheral at once?
twi is set to run 128 devices all connected to the same bus.
if you need more then that, there are buss switches that will parallel your lines and give you 126 addresses per.

----- Original Message -----
From: dawido85
To: A...
Sent: Monday, July 21, 2008 1:00 AM
Subject: [AT91SAM] [at91sam7x-ek] more TWI?
Hi,
I'm wondering, if it's possible to implement more than one TWI
interface? Can I use predefined registers? Can I control more then one
peripheral at once?
On Tuesday 22 July 2008 04:23:20 Tony Brenke wrote:
> twi is set to run 128 devices all connected to the same bus.
> if you need more then that, there are buss switches that will parallel your
> lines and give you 126 addresses per.

Electrical fanout means that you will unlikely be able to achieve anywhere
near 128 devices unless you use some sort of redriving circuitry.

> Hi,
> I'm wondering, if it's possible to implement more than one TWI
> interface? Can I use predefined registers? Can I control more then one
> peripheral at once?

As well as using more than 1 device on the TWI bus you can also implement a
bit-bashed I2C interface, as is done on the Lego NXT.
--- In A..., Charles Manning wrote:
>
> On Tuesday 22 July 2008 04:23:20 Tony Brenke wrote:
> > twi is set to run 128 devices all connected to the same bus.
> > if you need more then that, there are buss switches that will
parallel your
> > lines and give you 126 addresses per.
>
> Electrical fanout means that you will unlikely be able to achieve
anywhere
> near 128 devices unless you use some sort of redriving circuitry.
>
> > Hi,
> > I'm wondering, if it's possible to implement more than one TWI
> > interface? Can I use predefined registers? Can I control more
then one
> > peripheral at once?
>
> As well as using more than 1 device on the TWI bus you can also
implement a
> bit-bashed I2C interface, as is done on the Lego NXT.
>

Yes, I know i can connect more devices to TWI interface, depending on
line capacitance. But can I use e.g. at91sam7x to drive simultaneous
few slave devices? I'm wondering if I should implement more than one
master TWI device in at91sam7x (use different registers and PIOs) or
i should try to write information in delay time between each byte
being write (before I get transmission complete confirmation)?

--- In A..., "dawido85" wrote:
>
> Yes, I know i can connect more devices to TWI interface, depending on
> line capacitance. But can I use e.g. at91sam7x to drive simultaneous
> few slave devices? I'm wondering if I should implement more than one
> master TWI device in at91sam7x (use different registers and PIOs) or
> i should try to write information in delay time between each byte
> being write (before I get transmission complete confirmation)?

There is also a limitation based on address duplication. Some devices
have a single address, others have a small, limited number of
addresses they can use. So you can only put the full number of
devices on a single TWI bus if there is a lot of diversity. If you
want to connect even just 16 of the same device, you will need
multiple buses, possibly a lot of them.

Rick
I supose you could, but why?
if you need to talk to something that fast then the twi buss was the wrong interface to get the chip in.

see if you other item comes in SPI, that at least can run 1Mhz on some chips.

----- Original Message -----
From: dawido85
To: A...
Sent: Tuesday, July 22, 2008 12:10 AM
Subject: [AT91SAM] Re: [at91sam7x-ek] more TWI?
--- In A..., Charles Manning wrote:
>
> On Tuesday 22 July 2008 04:23:20 Tony Brenke wrote:
> > twi is set to run 128 devices all connected to the same bus.
> > if you need more then that, there are buss switches that will
parallel your
> > lines and give you 126 addresses per.
>
> Electrical fanout means that you will unlikely be able to achieve
anywhere
> near 128 devices unless you use some sort of redriving circuitry.
>
> > Hi,
> > I'm wondering, if it's possible to implement more than one TWI
> > interface? Can I use predefined registers? Can I control more
then one
> > peripheral at once?
>
> As well as using more than 1 device on the TWI bus you can also
implement a
> bit-bashed I2C interface, as is done on the Lego NXT.
>

Yes, I know i can connect more devices to TWI interface, depending on
line capacitance. But can I use e.g. at91sam7x to drive simultaneous
few slave devices? I'm wondering if I should implement more than one
master TWI device in at91sam7x (use different registers and PIOs) or
i should try to write information in delay time between each byte
being write (before I get transmission complete confirmation)?
try reading this.
it may help with your problem.
http://www.nxp.com/acrobat_download/various/philips_i2c_handbook.pdf
----- Original Message -----
From: Rick Collins
To: A...
Sent: Tuesday, July 22, 2008 5:21 AM
Subject: [AT91SAM] Re: [at91sam7x-ek] more TWI?
--- In A..., "dawido85" wrote:
>
> Yes, I know i can connect more devices to TWI interface, depending on
> line capacitance. But can I use e.g. at91sam7x to drive simultaneous
> few slave devices? I'm wondering if I should implement more than one
> master TWI device in at91sam7x (use different registers and PIOs) or
> i should try to write information in delay time between each byte
> being write (before I get transmission complete confirmation)?

There is also a limitation based on address duplication. Some devices
have a single address, others have a small, limited number of
addresses they can use. So you can only put the full number of
devices on a single TWI bus if there is a lot of diversity. If you
want to connect even just 16 of the same device, you will need
multiple buses, possibly a lot of them.

Rick
--- In A..., "Tony Brenke" wrote:
>
> I supose you could, but why?
> if you need to talk to something that fast then the twi buss was the
wrong interface to get the chip in.
>
> see if you other item comes in SPI, that at least can run 1Mhz on
some chips.
>

I use SPI too, but I need to use TWI to program devices that are
already in use... and my task is to program more than 1 device at the
same time, anyway, thanks for the link