Shop OBEX P1 Docs P2 Docs Learn Events
HMC5883L Compass Module — Parallax Forums

HMC5883L Compass Module

Wheat19Wheat19 Posts: 1
edited 2014-06-18 23:53 in BASIC Stamp
I just purchased the HMC5883L and downloaded the HMC5883L_demo.bs2. I get an error for the I2CIN and I2COUT commands. The error is (Label is missing ':'). When I look in the PBasic syntax guide it only shows the 2P,2PE and 2PX. Can I interface with the device using my BS2 or can you only use the 2P,2PE or 2PX?

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2012-02-07 16:45
    Hi, this link has the code you need. The BS2_IC does not support the I2C commands but uses SHIFTIN and SHIFTOUT as a substitute.

    http://sites.google.com/site/parallaxinretailstores/home/compass-module-3-axis-hmc5883l

    Jeff T.
  • siddiquesiddique Posts: 1
    edited 2014-06-18 22:35
    hi,
    i'm trying to read the data from hmc 5883l using AT89s52 controller. what is the minimum oscillator frequency which i need to read the data properly??
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-18 23:53
    siddique wrote: »
    hi,
    i'm trying to read the data from hmc 5883l using AT89s52 controller. what is the minimum oscillator frequency which i need to read the data properly??

    I don't understand how the oscillator frequency has anything to do with the HMC5883L?

    The sensor has a maximum I2C clock frequency of 400kHz but there isn't a minimum frequency listed. It can be read as slow as you want.
Sign In or Register to comment.