+ Reply to Thread
Results 1 to 6 of 6

Thread: Multiple HMC5883L compass units on one I2C line?

  1. #1

    Default Multiple HMC5883L compass units on one I2C line?

    The factory default address for the HMC5883L unit is 0x7E. Does anyone know if it is possible to change this setting so that it is possible to have multiple magnetic sensors on one two-wire bus? Or, is it mandatory that a separate dedicated SDA/CLK pair be used for each sensor?

    I am trying to build a magnetic sensor array and would like to simplify the comm bus if possible.

    Regards,

    sgm

  2. #2

    Default Re: Multiple HMC5883L compass units on one I2C line?

    Unlike most I2C devices, according to the datasheet, there is no provision for multiple devices on the I2C bus, so you'd need a separate I2C bus for each HMC5883L

  3. #3

    Default Re: Multiple HMC5883L compass units on one I2C line?

    Thanks Mr. Green. I have setup for 4 separate I2C channels on the PPDB.


    sgm

  4. #4

    Default Re: Multiple HMC5883L compass units on one I2C line?

    I have no problem running an HMC5883L and an EEPROM on the same bus. The datasheet does say, "The SCL and SDA lines in this bus specification may be connected to multiple devices. The bus can be a single master to multiple slaves, or it can be a multiple master configuration." (p. 17) I don't think it is a stretch to think that two HMC5883Ls would happily coexist. Of course, you will have to give them different addresses, which can be done by writing to the configuration register. If both are hard-wired on the bus it presents a chicken-and-egg problem.

  5. #5

    Default Re: Multiple HMC5883L compass units on one I2C line?

    Different classes of devices ... like EEPROMs and sensors like the HMC5883L ... use different groups of addresses. By convention, the block of addresses from $A0/$A1 through $AE/$AF allow for 8 EEPROMs although some larger (128K) EEPROMs use two addresses, one for each 64K block.

    The HMC5883L responds to I2C address $3C/$3D and there is no way to change this. As a result, there is no way to have more than one HMC5883L on the same I2C bus. You can have multiple I2C devices on the same bus, but they have to have unique addresses.

  6. #6

    Default Re: Multiple HMC5883L compass units on one I2C line?

    Dang, Mike. You are so right. (I have also used the HMC6352 compass, and that device does allow one to change the address. But not so with the HMC5883L or HMC5843L).

+ Reply to Thread

Similar Threads

  1. HMC5883L Compass Module
    By Wheat19 in forum BASIC Stamp
    Replies: 3
    Last Post: 06-19-2014, 06:53 AM
  2. main improvement of Compass Module 3-Axis HMC5883L
    By qiuqiuaaa in forum General Discussion
    Replies: 6
    Last Post: 02-16-2012, 02:08 PM
  3. Replies: 0
    Last Post: 01-10-2012, 01:41 AM
  4. Any luck with the HMC5883L Compass Module?
    By BonanzaMan in forum Propeller 1 Multicore Microcontroller
    Replies: 0
    Last Post: 12-29-2011, 06:38 PM
  5. HMC5883L Compass Module schematic ? - P82B715 i2c extender ICs
    By Greg P in forum Propeller 1 Multicore Microcontroller
    Replies: 0
    Last Post: 12-14-2011, 08:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts