Shop OBEX P1 Docs P2 Docs Learn Events
I2C Device Select — Parallax Forums

I2C Device Select

ArchiverArchiver Posts: 46,084
edited 2004-04-07 17:30 in General Discussion
The data sheet for an I2C device I'm looking at says the selection bits in
the slave address must match the external state of the device address pins. If

I tie A0 and A1 to ground, then in the address byte set A0 to 0 and A1 to 0,
would I be selecting this device. If I had another similar device on the same
bus and tied A0 to ground and pulled A1 high, then set the bits to A0 = 0, A1
= 1, would I then select the second device?

Sid


[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-04-06 13:09
    Yes, Sid, that is correct; the address transmitted from the master
    select the slave according to the state of those three pins.

    Mike


    --- In basicstamps@yahoogroups.com, Newzed@a... wrote:
    > The data sheet for an I2C device I'm looking at says the selection
    bits in
    > the slave address must match the external state of the device
    address pins. If
    > I tie A0 and A1 to ground, then in the address byte set A0 to 0 and
    A1 to 0,
    > would I be selecting this device. If I had another similar device
    on the same
    > bus and tied A0 to ground and pulled A1 high, then set the bits to
    A0 = 0, A1
    > = 1, would I then select the second device?
    >
    > Sid
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-06 19:00
    --- In basicstamps@yahoogroups.com, "upand_at_them"
    <upand_at_them@y...> wrote:
    > Yes, Sid, that is correct; the address transmitted from the master
    > select the slave according to the state of those three pins.
    >
    > Mike


    three pins ? I thought I2c was a 2 pin connection ?




    >
    >
    > --- In basicstamps@yahoogroups.com, Newzed@a... wrote:
    > > The data sheet for an I2C device I'm looking at says the
    selection
    > bits in
    > > the slave address must match the external state of the device
    > address pins. If
    > > I tie A0 and A1 to ground, then in the address byte set A0 to 0
    and
    > A1 to 0,
    > > would I be selecting this device. If I had another similar
    device
    > on the same
    > > bus and tied A0 to ground and pulled A1 high, then set the bits
    to
    > A0 = 0, A1
    > > = 1, would I then select the second device?
    > >
    > > Sid
    > >
    > >
    > > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-07 15:53
    I2C is a 2 pin interface, yes. The three pins referred to are the
    hardware address pins of the slave device. The pin configuration of
    the slave determines its address, which is used in the communication
    protocol.

    Although the address pins can be controlled they're almost always
    hardwired; tie them all low and that device is referred to as 000,
    tie them all high and that device is 111.

    Mike


    --- In basicstamps@yahoogroups.com, "Dave Mucha" <davemucha@j...>
    wrote:
    > --- In basicstamps@yahoogroups.com, "upand_at_them"
    > <upand_at_them@y...> wrote:
    > > Yes, Sid, that is correct; the address transmitted from the
    master
    > > select the slave according to the state of those three pins.
    > >
    > > Mike
    >
    >
    > three pins ? I thought I2c was a 2 pin connection ?
    >
    >
    >
    >
    > >
    > >
    > > --- In basicstamps@yahoogroups.com, Newzed@a... wrote:
    > > > The data sheet for an I2C device I'm looking at says the
    > selection
    > > bits in
    > > > the slave address must match the external state of the device
    > > address pins. If
    > > > I tie A0 and A1 to ground, then in the address byte set A0 to 0
    > and
    > > A1 to 0,
    > > > would I be selecting this device. If I had another similar
    > device
    > > on the same
    > > > bus and tied A0 to ground and pulled A1 high, then set the bits
    > to
    > > A0 = 0, A1
    > > > = 1, would I then select the second device?
    > > >
    > > > Sid
    > > >
    > > >
    > > > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-07 17:30
    > --- In basicstamps@yahoogroups.com, "upand_at_them"
    > <upand_at_them@y...> wrote:
    >> Yes, Sid, that is correct; the address transmitted from the master
    >> select the slave according to the state of those three pins.
    > three pins ? I thought I2c was a 2 pin connection ?

    I2c is; the "three pins" he's referring to are the address pins on the chip
    that tell it its I2C address.

    --
    Enjoy,
    George Warner,
    Schizophrenic Optimization Scientists
    Apple Developer Technical Support (DTS)
Sign In or Register to comment.