what happened to your results when you change to a Byte Sized variable? you should read something between 0-255
NOW if you want to use a word sized variable, YOU MUST READ register #2, not 1, so try...
Code:
ControlByte VAR BYTE
Register VAR BYTE
ControlByte = $C0
Register = 2
'
'
'
'
i2cread dpin,cpin,ControlByte,Register,[bearing.highbyte, bearing.lowbyte]
and you should read something in a range of 0-3599
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1249&stc=1&d=116582183 1">
About now?
Last edited by mister_e; - 11th December 2006 at 07:30.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks