Hi,
I'm pretty new to the foxboard and I can't get the I2C bus fully working. I
want to use a servo controller (SD20). I am using the new driver from Geert
Vancompernolle (the one from the rar file in the yahoo groups file list)
I can write to the I2C bus with
adc.slave = 0xC2;
adc.wbuf[ 0 ] = 1;
adc.wbuf[ 1 ] = servocounter+=10;
adc.wlen = 2;
int err = ioctl( fd_i2c, _IO( ETRAXI2C_IOCTYPE, I2C_WRITE ), &adc );
This works perfectly. However, reading using WRITEREAD produces strange
results: (the first number is the value I wrote to the register, the second
is the value I get when I read it back):
servo value: 8, read: 132
servo value: 18, read: 137
servo value: 28, read: 142
servo value: 38, read: 147
servo value: 48, read: 24
servo value: 58, read: 157
servo value: 68, read: 162
servo value: 78, read: 167
servo value: 88, read: 172
servo value: 98, read: 177
It is interesting that the steps are 5 on the read values, while the steps on
the values I set are 10. Seems it is missing one bit... Do you think this is
a software or hardware problem?
Any help would be much appreciated.
Best regards,
Cornelius
--
Cornelius Claussen
opentek GbR
Mobile: +49 (0)175 6944518
E-Mail: [EMAIL PROTECTED]
Internet: http://www.opentek.de
USt.-IdNr.: DE242952925