Hi I am working on MC60E I want to drive a ADXL345 with i2c . I have problem in driving this sensor.
I am using DCD pin as SDA and RI pin as SCL .My device adress is 0x53 I shift it on bit (0x53<<1) .
This some part of my code :
ret = Ql_IIC_Init(1,PINNAME_RI,PINNAME_DCD,1);
ret = Ql_IIC_Config(1,TRUE, I2C_ADDRESS, 300);
and for send and read data I am using :
u8 data_read[4];
u8 data_write[]={0x00,0x11,0x22,0x33};
ret = Ql_IIC_Write(1, I2C_ADDRESS, data_write,1);
ret = Ql_IIC_Read(1, I2C_ADDRESS, data_read,1);
I am monitor the i2c line with logic analizer :
what is the gap and stop and start between my write and my read ?
I test my sensor with arduino nano board and monitor the line every things is ok and I get the device id successfuly this is my result :
When I try to do it with mc60e I have a gap between write and read that contain a stop codition and a start condition .
even I only use write funtion I get this result :
Why mc60 after i2c stop condition pull SDA line LOW it means i2c start condition I also use two 10 K pull up resistor on SDA and SCL line .
I dont use any other command in my code :
what is the problem ?I think this gap generate this promlem .