Shop OBEX P1 Docs P2 Docs Learn Events
3 I2C magnetometer IC with same address in Propeller 1 — Parallax Forums

3 I2C magnetometer IC with same address in Propeller 1

Hi! It's possible to connect 3 magnetic sensors who has same hard wired address in the Proppeler Bus? and direct one Cog for Each one for processing X:Y and Z axis?
I need to compute a irregular moving magnetic field direction, and I intend to use 3 sensors 120º degree apart.
I Bought some time ago some Propeller chips and books, but never used them, now seems the time for using them.

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2017-03-07 09:30
    Welcome to the forums DB.

    Always try to attach real information with your posts, such as part numbers, links, photos even if there is a problem with a breadboard etc. In your case it would be helpful to know which part you are using and whether you want to access them in parallel with individual cogs or you are happy to have one cog access one at a time. You can just give each device its own 2 I2C lines if you want independent parallel access from each cog or you could common the SCL line and use 3 data lines etc.

    btw, shame on you for waiting this long to use the Propeller but kudos for having bought them in the first place!
  • you could common the SCL line and use 3 data lines

    This is the approach I'd take. You could clock all three sensors at the same time and read the data back on the three different data lines.

    This approach would limit your ability to use clock stretching but not many I2C devices use clock stretching.

    I wouldn't assign a cog to each sensor. IMO you'd be better off using one cog to read all three.

  • Hi friends, let me explain to Mr. Peter Jakacki, you're partially right, is lot of time , but some 10 years ago, I started to import tens of all Development Microcontroller boards and hundreds of books waiting for my retirement , but now nearly 6 years after the retirement I have less time and works much harder than before!!
    But the good News! my Propeller Demo Board is working and give me a "Hello! in the terminal! last night after installation of the software in Win 10
    I want to Use 3 the HMC5883L Breakout board 3 axis I2C Magnetometer- for the other processors I need to have a I2C Multiplexer( Nearly 90 days from China!),I ordered some -.
    In the page 170 fig 4.39 of the book " Programming and Customizing the Multicore Propeller Microcontroller" has nearly what I want, with the difference: the the sensor is static and moving is the magnetic field.
    Now I'm confident that I can accomplish it. I've seen the information, that all serial stuff within Propeller is software, and I can use nearly any pin as serial in-out, than I can have 3 or more serial objects running at same time I want 4 serial ports/Objects(3 I2C ,and1 RS232). Am I right?
    Best regards! (I must have learn SPIN and RobotBasic) I have 3 books about Spin, and one of Propeller interfacing with RobotBASIC ,but found none about Propeller C!
Sign In or Register to comment.