10-12-2015 05:25 AM
Hi,
We are working with Tetrix and the MyRio for the WRO college level competion. I have tried just about everything I could think of but I can't explain why I'm getting random garbage when trying to read registers on the DC motor controller through I2C.
I have followed the Datasheet provided by HiTechnic and I don't understand why I can write to the motors to get them to move, but I can't read anything useful from the Registers?
Even constants in addresses 08~0F which is supposed to list the manufacturer "HiTechnc" or "48 69 54 65 63 68 6E 63" and addresses 10~17 which is supposed to list the Sensor Type "MotorCon" or " 4D 6F 74 6F 72 43 6F 6E" is returning a random sequence of bytes each time any of those addressed are read.
I hope someone has encountered this before, because I'm running out of time to fix this.
Thanks,
Marco
10-13-2015 02:10 PM
I'm more familiar with the 845x driver than the myRIO Express VIs but do you get a constant return if you just read one byte starting at 0x00 when the Express VI is just configured as Read (not Read/Write)?
10-15-2015 01:29 AM
Hi Matt,
If I just read without writing I get a random number, without writing I can't specify which register to read from.
I contacted the people who made the unit and they told me to slow down the fcl down to 10Khz. I don't know if or how that can be done as the CNTR register only supports u8 and the value needed I calculated to be 2013.
Thanks,
Marco
10-16-2015 10:44 AM
@MarcoVan wrote:
I contacted the people who made the unit and they told me to slow down the fcl down to 10Khz. I don't know if or how that can be done as the CNTR register only supports u8 and the value needed I calculated to be 2013.
I didn't quite understand this, was this a mistype of "slow down the scl down to 100khz"? Can you also explain your concern about CNTR register.