i2c advaned addressing

  • Synopsis

    • The i2c bus is controlled by an i2c bus master. (Not to be confused with a 1-wire bus master like the DS2482).
    • The i2c bus master is handled by the operating system, and given a port address (like /dev/i2c-0 /dev/i2c-1, ...)
    • Each i2c bus, in turn, can hold several i2c devices (i2c slaves), each with a (hardware selected) address like 0x18, 0x19, ...
    • It is possible, in OWFS, to specify an exact i2c bus and i2c slave device address.
    • It is also possible to select any or all i2c slaves.
  • Simple mode (just the port)

    • In the simple mode, only the i2c port is specified and the FIRST DS2482 will be chosen.
    • Syntax:
      -d /dev/i2c-0
  • Advanced mode

    All advanced addressing options use
    --i2c 
    rather than
    -d 
    • port

      Specifying just the port is the equivalent of simple mode -- the first DS2482 on that i2c bus will be selected
      --i2c=/dev/i2c-0  # First DS2482 on bus 0

      If no port is given, OWFS will scan through the first 99 i2c buses and select the first match. So
      --i2c    # will match the first DSS2482 found         
    • address

      A specific i2c address can be specified using the syntax:
      --i2c=/dev/i2c-0:0  # Bus 0, Address 0 (0x18)
      or
      --ic2=/dev/i2c-1:2  # Bus 1, Address 2 (0x1A)
      If no address is specified, the first matching DS2482 will be chosen.
    • ALL

      The wildcard ALL can be used as a port or address and all matching DS2482's will be used
      --i2c=/dev/i2c-2:ALL   # All DS2482 on bus 2
      and
      --i2c=ALL:ALL  # All DS2482 on all i2c buses

Address table

i2c address
Pins selectedin chip command line
address
i2c slave
address
DS2482-100 DS2482-101 DS2482-800
0 0 0x18 yes yes yes
1 1 0x19 yes yes yes
2 2 0x1A yes yes yes
3 3 0x1B yes yes yes
4 4 0x1C no no yes
5 5 0x1D no no yes
6 6 0x1E no no yes
7 7 0x1F no no yes

Previous page: i2c parallel port design
Next page: i2c DS2482-800