I2c hmc5843
electric550
Posts: 122
Hello I am new to I2C I am planning on ordering the HMC5843. I am planning on attempting to run the device in parallel with the EEProm using 10k pullups due to lack of IO pins. I was wondering if anyone has used this device or if anyone has any suggestions on this topic. I am a bit confused as to how the addressing works, for the chips and I am not sure if they would be compatible on the same bus or how to begin to set them up. Anyways if anyone has some suggestions I would greatly appreciate the help. Thanks!
Comments
The Demo Board and some other Propeller development boards has a pullup resistor on SDA, but not SCL. You may need to use a pullup resistor to Vdd on both lines. The HMC5843 has an optional built-in pullup which you can use for SCL. It turns out that the Protoboard has both pullups already connected.
I have it currently running alongside a lis3lv02dl accelometer and a cmps03 compass and have been cross-checking the results and they are similar - the compass heading for both flat matches (with an offset due to the way I mounted them). The accelometer values track - though it doesn't doc the acc ranges I have heard is +-1G, when I double the hmc6343 values it tracks the lis3lv02dl values.
The raw mag values are meant to be +-1Gauss though I haven't tried checking it, but I can read them ok.
It is pretty sensitive to mag fields - I have a servo about 4" way and it detects it - the heading of both the hmc6343 and cmp03 vary about +-0.5 degrees depending on what the servos doing. I haven't tried more powerfull mag fields though. Also I have found both the hmc6343 and cmp03 vary by that much just on 1 read to the next without the servos running - I haven't played with the filters - they are at default values. Without the servo the varation looks pretty much random, with teh servos it tracks the servo movement (its a pan/tilt system).
Not totally convinced its worth the extra money over a non-tilt compensated compass and some software effort with a separate accelometer but it does work without problem (as long as you have clock stretching, the original basic_i2c_driver gives crazy results and I tried another computer whos I2C implementation doesn't support clock stretching and it also gave crazy results).
Let me know when it arrives and I can send you my version of basic_i2c_drover that supports clock stretching.
Multiple devices on 1 I2C bus, shouldn't be a problem - the current board I am working on have 14 I2C devices - 12 (include eeprom) on the booteeprom bus. The only reason the other 2 are on a different I2C bus is 1 has the same address as the eeprom and is not changable.
I am using the hmc5843 and do not know how to set/reset the hmc5843. Any help please?
Thanks,
John.