Just the use of a word size variable, invokes PBP to read two bytes. It places the first byte in the var.highbyte and the second in the var.lowbyte. EDIT: Sorry, I didn't see that you were not writing, not reading - this is for reading)
If this is not the order you want, you'll have to exchange the two bytes outside the I2C instruction. I'm not sure of all the techniques (like using PBP SWAP) will work, but it's a standard process that can be done using a temporary 'working' word size variable.
temp.highbyte = var.lowbyte
temp.lowbyte = var.highbyte
var = temp
Last edited by JD123; - 5th April 2008 at 16:41.
No, I'm not Superman, but I did stay at a Holiday Inn Express last night!
Bookmarks