
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,
Tobi