1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Reading D/S (hmc5983 compass module)

Discussion in 'Microcontrollers' started by camerart, Feb 28, 2018.

  1. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,827
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    I've read this a number of times, but can't see how '0x1e' plus 1BIT, is used, unless it's just an example.

    The Plus 1BIT is also a puzzle, the 'i,e, 0x3D for READ and 0x3C for WRITE. 0x3C %00111100 and %00111101 which is the LSBIT. I'm sure that sometimes the MSBIT is used for READ/WRITE.

    What does COMMEND mean?

    See attached:

    Camerart
     

    Attached Files:

  2. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,723
    Likes:
    422
    Location:
    Brisbane Australia
    It's I²C with an address of 0x1E and an additional bit is added on the end to tell the device if you want to read or write so it becomes 0x1E shifted left 1 and an additional bit added which results in 0x3C or 0x3D.

    I'm pretty sure Commend is a typo and means command.

    Google I²C protocol.

    Mike.
     
  3. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,827
    Likes:
    11
    Location:
    Dorset UK.
    Hi P,
    It makes more sense now.
    Who needs puzzles when you've got D/S to read:)
    Thanks, C.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice