04-06-2010 03:45 PM
Has anyone tried using the NXT I2C function in LV2009 to drive the MC25 brushed motor driver?
I cannot get them to talk. I did add 82k pull-up resistors to CLK and DATA lines as instructed in the NXT hardware interfacing data.
I have tried several registers including 0x0A (battery voltage) which seems fairly safe and well defined.
I get the right number of bytes of data but it is either 0 or 255 randomly
John Prentice
04-12-2010 07:26 AM
Hi John,
Most of the problems I find with I2C is either incorrect pull-ups or incorrect addressing. The MD25 usually has a default address of 0xB0, is this what you are using? Also, 82k seems a little high- does the NXT documentation say its safe to use a smaller value, like 10k?
04-12-2010 08:28 AM
Mark, greetings and thanks for your reply.
The 82k value came from the Lego document LEGO MINDSTORMS NXT - Hardware developers Kit (Ver 1.0) Page 9. It is also the value used in the LEGO Ultrasonic sensor unit.
I did use the address 0x80 and the LED flashes (or rather no flashes!) on the MD25 confirm that this is the address it is programmed to.
Substituting address 0x02 and a suitable register address in my VI will address the Ultrosonic sensor.
I was wondering if there might be a problem with the b7 being set in the address. I have a U8 wire but there might the trouble in the underlying I2C code. Hence the query if anyone had got the MD25 going. It and two geared motors with encoders is sold at a competetive price by lots of outlets.
John Prentice
04-12-2010 08:34 AM