Based on the somewhat limited documentation on the Devantech website I think you must write the register address and then read that register back. So you have to write 4 register addresses and read each back in sequence.
Note that the read/write bit is set for oyu automatically by the i2cin and i2cout commands so you can ignore the read/write bit in the i2c commands.
Code:
encoder1 var long
encoder2 var long
main
;read encoder1
i2cout sda,scl,0xB0,[2]
i2cin sda,scl,0xB0,[encoder1.byte3]
i2cout sda,scl,0xB0,[3]
i2cin sda,scl,0xB0,[encoder1.byte2]
i2cout sda,scl,0xB0,[4]
i2cin sda,scl,0xB0,[encoder1.byte1]
i2cout sda,scl,0xB0,[5]
i2cin sda,scl,0xB0,[encoder1.byte0]
;read encoder2
i2cout sda,scl,0xB0,[6]
i2cin sda,scl,0xB0,[encoder2.byte3]
i2cout sda,scl,0xB0,[7]
i2cin sda,scl,0xB0,[encoder2.byte2]
i2cout sda,scl,0xB0,[8]
i2cin sda,scl,0xB0,[encoder2.byte1]
i2cout sda,scl,0xB0,[9]
i2cin sda,scl,0xB0,[encoder2.byte0]
serout s_out,i9600,[dec encoder1," ",dec encoder2,13]
pause 100
goto main
I could not find anythign in the document on their website saying you could just write the first byte of the encoder registers and then read 4 bytes out to get all 4. This may work but I don't have a MD25 to try it on. Try the above code and let me know what happens.
Also in your code you define you register buffer as 14 bytes but you load 17 bytes into it. This is definitely a problem. You need to increase the size of abMW25 to 17 bytes. You for next goes from 0 to 16 which is 17 total positions.