Shop OBEX P1 Docs P2 Docs Learn Events
I2C-driver callable from ASM? — Parallax Forums

I2C-driver callable from ASM?

Nick MuellerNick Mueller Posts: 815
edited 2007-12-25 15:44 in Propeller 1
Hi!

I need to call I2C from assembler (and SPIN). And I need to make sure that more than one cog can safely access I2C (EEPROM and an ADC).
Now I could use the I2C-driver from Parallax (it's almost written in ASM) and write a wrapper around it (in ASM) that does handle the concurrent access. Communication would have to happen via HUB-RAM (status and scratch-area for block read/write).
But maybe someone has done that already?


Nick

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!

The DIY Digital-Readout for mills, lathes etc.:
YADRO

Comments

  • Nick MuellerNick Mueller Posts: 815
    edited 2007-12-25 12:46
    > Now I could use the I2C-driver from Parallax (it's almost written in ASM)

    Did I dream that? Can't find it anymore.
    Does any I2C-driver in ASM exist?


    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • RaymanRayman Posts: 14,162
    edited 2007-12-25 13:39
    I think I saw one by Mike Green somewhere... Maybe in FemtoBasic?
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-12-25 14:08
    rayman, it's searchable as Basic_i2c_driver.spin, and yes, it's written by Mike.

    But simpler still is the item in object exchange: http://obex.parallax.com/objects/26/
  • Nick MuellerNick Mueller Posts: 815
    edited 2007-12-25 14:39
    > it's searchable as Basic_i2c_driver.spin,

    But it's written in Spin. Doesn't help me. :-(

    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • Nick MuellerNick Mueller Posts: 815
    edited 2007-12-25 15:44
    > I think I saw one by Mike Green somewhere... Maybe in FemtoBasic?

    Right! It's there. In the file "sdspiFemto.spin

    Thx!
    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
Sign In or Register to comment.