Recommend this page to a friend!

      PHP Serial  >  All threads  >  I2C  >  (Un) Subscribe thread alerts  
Summary:Communcation with a Motorcontroller via I2C
Author:Tobias Krieger
Date:2009-06-11 18:47:27

  1. I2C   Reply   Report abuse  
Picture of Tobias Krieger Tobias Krieger - 2009-06-11 18:47:27
Has someone experience with I2C Devices and PHP?

I've a MD23 (Motorcontroller), writting works (almost), but for reading is tricky and unsuccessfull until now:

According to the manufactor reading should work like this:

I2C communication protocol with the MD23 module is the same as popular EPROM's such as the 24C04. To read one or more of the MD23 registers, first send a start bit, the module address (0XB0 for example) with the read/write bit low, then the register number you wish to read. This is followed by a repeated start and the module address again with the read/write bit high (0XB1 in this example). You are now able to read one or more registers. The MD23 has 17 registers numbered 0 to 16 as follows;

(see http://www.robot-electronics.co.uk/htm/md23tech.htm)

I would like to read now e.g. I2C Address 0x58, Register 10, 1 Byte

Any ideas, suggestions, code examples? How can I check if the line is low or high?

Thanks in advance,


For more information send a message to info at phpclasses dot org.