12.07.2015 Views

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Changing the I2C Bus AddressTo change the I2C address of the MD25 by writing a new address you must have only onemodule on the bus. Write the 3 <strong>se</strong>quence commands in the correct order followed by theaddress. Example; to change the address of an MD25 currently at 0xB0 (the default shippedaddress) to 0xB4, write the following to address 0xB0; (0xA0, 0xAA, 0xA5, 0xB4 ). The<strong>se</strong>commands must be <strong>se</strong>nt in the correct <strong>se</strong>quence to change the I2C address, additionally, noother command may be issued in the middle of the <strong>se</strong>quence. The <strong>se</strong>quence must be <strong>se</strong>nt tothe command register at location 16, which means 4 <strong>se</strong>parate write transactions on the I2Cbus. Becau<strong>se</strong> of the way the MD25 works internally, there MUST be a delay of at least 5mSbetween the writing of each of the<strong>se</strong> 4 transactions. When done, you should label the MD25with its address, however if you do forget, just power it up without <strong>se</strong>nding any commands.The MD25 will flash its address out on the green communication LED. One long flashfollowed by a number of shorter flashes indicating its address. Any command <strong>se</strong>nt to theMD25 during this period will still be received and writing new speeds or a write to thecommand register will terminate the flashing.AddressDecimalHexLongFlashShortFlashes176 B0 1 0178 B2 1 1180 B4 1 2182 B6 1 3184 B8 1 4186 BA 1 5188 BC 1 6190 BE 1 7Take care not to <strong>se</strong>t more than one MD25 to the same address, there will be a bus collisionand very unpredictable results.Bart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!