Question About I2C Coding

Started by Steve Whittle February 28, 2006
Hello Group,

I am hoping that someone will be able to answer a question about I2C
programing, I need to be able to write an UnsignedInteger to an I2C
device. Using The I2C routines in the files section will the following

    Call I2cByteWrite(I2cAddr, I2cReg, CByte(RamPeek(MemAddress
(I2cData)))               ' send hi-byte
    Call I2cByteWrite(I2cAddr, I2cReg + 1, CByte(RamPeek(MemAddress
(I2cData) + 1))  ' send low-byte

Where I2cData is an UnsignedInteger

Question, will this potentially cause a problem as the UnsignedInteger
is being sent as two seperate bytes (i.e. I2cStop() is called at the end
of the I2cByteWrite() subroutine) if so what would the correct coding

Many thanks in advance

	"Anything that happens, happens.
Anything that, in happening, causes something else to happen, causes
something else to happen.
Anything that, in happening, causes itself to happen again, happens
It doesn't necessarily do it in chronological order, though."