element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum I2C Communications
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 14 replies
  • Answers 7 answers
  • Subscribers 474 subscribers
  • Views 1801 views
  • Users 0 members are here
  • embedded c
  • arduino programing
  • stm-32
  • ewarm
  • how to i2c
  • 3-axis magnetometer
  • iar
Related

I2C Communications

rbevy101
rbevy101 over 8 years ago

Hi guys! I have a sensor module that I am trying to use. I can't seem to get it working with I2C.

Does anyone have any tips or can anyone point me to any useful materials to help me make progress with this sensor?

 

The sensor is a 3 axis magnetometer.

 

Thanks!

  • Sign in to reply
  • Cancel

Top Replies

  • koudelad
    koudelad over 8 years ago +3 suggested
    If you prefer a video tutorial, Ben Hack made one: www.youtube.com/watch Depending on how serious you are with electronics, I can recommend buying a logic analyzer (some cheap cost a few dollars). Or,…
  • clem57
    clem57 over 8 years ago +2 suggested
    You do not show any details, so a general tutorial may help https://learn.sparkfun.com/tutorials/i2c
  • koudelad
    koudelad over 8 years ago in reply to rbevy101 +1 suggested
    I've quickly gone through the linked datasheet and I think you only have to properly set MR_REG_M register in order to start measuring. By default (after reset), it is in sleep-mode.
Parents
  • koudelad
    0 koudelad over 8 years ago

    If you prefer a video tutorial, Ben Hack made one:

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

     

    Depending on how serious you are with electronics, I can recommend buying a logic analyzer (some cheap cost a few dollars). Or, some microcontroller programmers have support for various protocols analysis (UART, I2C, SPI).

    This allows you to test any new sensor/device with a piece of HW and SW that is proven to work and later makes it easier to debug your own HW and firmware. Almost all microcontroller families now have an integrated I2C module and most development environments have ready made libraries for it.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • koudelad
    0 koudelad over 8 years ago

    If you prefer a video tutorial, Ben Hack made one:

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

     

    Depending on how serious you are with electronics, I can recommend buying a logic analyzer (some cheap cost a few dollars). Or, some microcontroller programmers have support for various protocols analysis (UART, I2C, SPI).

    This allows you to test any new sensor/device with a piece of HW and SW that is proven to work and later makes it easier to debug your own HW and firmware. Almost all microcontroller families now have an integrated I2C module and most development environments have ready made libraries for it.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube