Shop OBEX P1 Docs P2 Docs Learn Events
I2C Propeller C Tutorial or Example — Parallax Forums

I2C Propeller C Tutorial or Example

c07Brian.Kesterc07Brian.Kester Posts: 36
edited 2014-07-01 18:10 in Learn with BlocklyProp
I would appreciate a Propeller C I2C Tutorial similar the the SPI tutorial. I have looked around, so if I missed it, I would appreciate being pointed in the right direction. Failing that, I would like to see an example code for a sensor using i2c protocol, so that I can work on programming sensors in Propeller C that do not have a SPI option. I am working on the 3-axis compass with a Propeller Activity Board, but I would appreciate an example of anything where I could look at a data sheet and see how to go from the datasheet to the code. I know there are more examples using SPIN, but I am interested in using C for educational purposes and personal interest. Thanks!

Comments

  • Steph LindsaySteph Lindsay Posts: 767
    edited 2014-06-02 17:01
    Hi Brian,

    I'm in the final editing stages of just such a tutorial. It uses the i2c_in and i2c_out functions to write to and read from the Propeller Activity Board's EEPROM as an example device (though there are other "ee_" functions in the simpletools library that would be even easier to use). I'll post again here as soon as it is published.

    -Steph
  • c07Brian.Kesterc07Brian.Kester Posts: 36
    edited 2014-06-02 17:54
    Awesome, Steph, I am looking forward to it. Any idea on how long it will be? I promise not to hold you to any estimate :) I'm on a somewhat short timeline for some aspects of the project, which I definitely know is not really YOUR concern, but I'm just trying to gauge what my timeline is going to need to look like. Also, if you just had an example script I could use in the meantime, I would be very grateful. If not and you're just going to roll it out with the full tutorial, I totally understand... just figured I would ask.
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2014-06-02 18:27
    Awesome, Steph, I am looking forward to it. Any idea on how long it will be? I promise not to hold you to any estimate :) I'm on a somewhat short timeline for some aspects of the project, which I definitely know is not really YOUR concern, but I'm just trying to gauge what my timeline is going to need to look like. Also, if you just had an example script I could use in the meantime, I would be very grateful. If not and you're just going to roll it out with the full tutorial, I totally understand... just figured I would ask.

    I'm hoping to have it posted later this week. But I'd be happy to send you the draft - just send me an email to editor@parallax.com. I always appreciate having an extra set of eyes on draft material.
  • GenetixGenetix Posts: 1,754
    edited 2014-06-05 19:03
    Steph,

    Is there code to download for this Tutorial? Some have code and some don't.
  • Courtney JacobsCourtney Jacobs Posts: 903
    edited 2014-06-09 08:42
    The I2C tutorial is now live on Learn!

    Check it out here: http://learn.parallax.com/propeller-c-simple-protocols/diy-i2c
  • mklrobomklrobo Posts: 420
    edited 2014-07-01 18:10
    I have played with IC2 a little bit. I think the meridian phone systems that use norstar phones, use the protocol. the IC2 rides on the DC power to the phones. Tried talking to
    a phone with a BS2, no dice. :(
Sign In or Register to comment.