thanks for the book.

on the other hand, i would like to continue with this project as it is important for me and the kids in school.

I have done the first attempt to communicate with the sensor but no luck.

Based on the Datasheet MAX30102, device address, or slave id: %1010111, consists of 7 bit, B7-B1,and the MSB-7 is transmitted first followed by the remaining bits. B0 is LSB which can be 0 if we write or 1 if we read.

Then again from the manual explains that for the first write operation, we send the slave id as the first byte!....followed by the register address byte and then one or more data.

From the PBP manual, and from this link http://www.picbasic.co.uk/forum/cont...-EEPROM-Part-1

It is clear that I2CWRITE and I2CREAD command takes care of the write or read bit, also for the ACK.

Name:  from max30102.png
Views: 1322
Size:  101.9 KB

Now i have tried to send the following:

if PBP and command I2CWRITE takes care of the 8th bit then how could i manage to correspond it in the code.

Code:
i2cwrite sda,scl,%1010111,$04,error ' this is slave id cosnist of 7 bits.
If i send the above command nothing will happen, and the data line will be offset from the clock.

Name:  wrong code.png
Views: 1347
Size:  423.1 KB

Now using the following code:

Code:
i2cwrite sda,scl,%10101110,$04,error
i get this on the scope:

Name:  no ack.png
Views: 1305
Size:  663.0 KB

then i tried the following:
Code:
i2cwrite sda,scl,%10101110,$04,error
pause 100
i2cwrite sda,scl,%10101110,$04,error
and the result on the scope: it looks strange again.

Name:  strange.png
Views: 1155
Size:  604.4 KB