Shop OBEX P1 Docs P2 Docs Learn Events
SX I2C Speed — Parallax Forums

SX I2C Speed

lboucherlboucher Posts: 139
edited 2010-04-01 02:24 in General Discussion
Hi All

I happened to select a device which support I2C Fast Mode Plus and i would like to take advantage of this capability.

Can any SX chip support this?
What about prop's?

I see some references to some i2cspeed command, but it looks like that got dropped somewhere in the past.

My assembly experience is minimal, i am assuming I just need to change a couple lines but which ones?

Thanks

Post Edited (lboucher) : 3/31/2010 10:37:24 PM GMT

Comments

  • ZootZoot Posts: 2,227
    edited 2010-03-31 22:36
    If you are using SX/B then use the I2CSPEED before any I2C statements or subroutines (just once at the top of the application, for example). This lets you multiply the base SX I2C speed (100khz) by whatever you want.

    I2CSPEED 2.0
    ' would make any subsequent I2C statements run w/approx. 200khz clock

    I2CSPEED 4.0
    ' would be 400khz

    'applies to any subsequent SX/B statements such as
    'I2CSTART
    'I2CSEND
    'I2CSTOP
    'etc
    What's New IN SXB 2 said...
    I2CSPEED Directive

    The I2CSPEED directive will adjust the speed of the I2C commands(I2CSTART, I2CSTOP,
    I2CSEND and I2CRECV). Using "I2CSPEED 4" will make the commands execute 4 times faster.
    Using "I2CSPEED 0.5" will make the commands execute 1/2 as fast. This feature was added
    because some devices are capable of faster speeds, and some devices require slower
    speeds. NOTE: This is a directive and not a command. It does not generate any code by
    itself, and functions completely top-down.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • lboucherlboucher Posts: 139
    edited 2010-04-01 01:53
    Woops didn't even realize there was a beta compiler seperate from the main install.
    I assume they are stopping development due to the sx end of life.
    Might make sense to put a link with all the other downloads.

    Thanks for the heads up.
  • ZootZoot Posts: 2,227
    edited 2010-04-01 02:24
    I'm not sure if Bean will do a "formal" release, but the current "beta" for 2.x has been stable and free of bugs for quite some time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
Sign In or Register to comment.