Shop OBEX P1 Docs P2 Docs Learn Events
BS2P - 16-bit I2CIN — Parallax Forums

BS2P - 16-bit I2CIN

ArchiverArchiver Posts: 46,084
edited 2003-02-26 11:46 in General Discussion
Hello,
I am trying to use the I2CIN command to get 16 bits of data from a
given address using a BS2P. I know this can be done, but can't figure
out how to do it.

Does anyone know how to do this? I'm talking about a single I2CIN
command, not two.

Thanks a lot.

John Marcolina

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-02-26 11:46
    You can read two bytes with one I2CIN command, and with variable aliasing in
    the Stamp end up with a single 16-bit value. Like this:

    I2CIN pin, slave_id, address, [noparse][[/noparse]value.LowByte, value.HighByte]


    -- Jon Williams
    -- Parallax


    In a message dated 2/25/2003 10:50:11 PM Central Standard Time,
    jmarcolina@y... writes:

    > Hello,
    > I am trying to use the I2CIN command to get 16 bits of data from a
    > given address using a BS2P. I know this can be done, but can't figure
    > out how to do it.
    >
    > Does anyone know how to do this? I'm talking about a single I2CIN
    > command, not two.
    >
    > Thanks a lot.
    >
    > John Marcolina



    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.