2005-09-23 02:24 PM
2011-05-17 03:08 AM
Dear All:
I use upd3300_elcd board,and use some sample code, but I can't read M41ST87 date and time, my test code (all functione use sample code): I2C_ADDR=0xD0 upsd_i2c_init (400,I2C_ADDR); // I2C initialize temp_xmit_buf[0] = 0x01; // ready to read ST87 register=01 upsd_i2c_Master_Xmit(I2C_ADDR,temp_xmit_buf,1); upsd_i2c_Master_Recv(I2C_ADDR,temp_rcv_buf,255); Is something worng? Zues2011-05-17 03:08 AM
It's too bad there wasn't a timely reply to biczues' message, but in case someone else encounters this: the text of the M41ST87 (M41ST87W) datasheet appears to be wrong in claiming that the address is D0h. If you look at the timing diagrams, it clearly uses a 7-bit I2C address. That is, 1101000 -> 0x68. When you write it out over the wire, you add one more low bit to indicate read/write, so the wire value will look like 0xD0 or 0xD1, both meaning address 0x68.