I have a LSM330DLC accelerometer set up with a PIC18F14K50 but used the MSSP hardware module for the I2C. What a workout!
This device also calls for the "Repeated Start Condition" when reading a register.

Unfortunately, I am using PBPX 3.0. So can't say if this works the same as your version.

After playing around with the I2CREAD a little bit, was surprised to find that the READ statement supplied everything to read the "WHO AM I" register of the Gyro with just the I2CREAD statement.

Gyro info:
Write address = $D6
Read address = $D7
Device ID register located at $0F should contain $D4

This code provided the following as seen on the screen capture:
  • Start condition (1st Green dot)
  • Write to address $D6 to Read register $0F
  • Inserts the "Repeated Start Condition" (SR), (2nd Green dot)
  • Then the Read address $D7 followed with the clocked in Gyro register data value $D4
Code:
MAIN:
    I2CREAD SDA,SCL,$D7,$0F,[Mem_data]             
    PAUSEUS 100     ' A little pause to visually seperate on display
GOTO MAIN
Name:  I2C Read.jpg
Views: 1490
Size:  81.4 KB


I learned something new today. Hope this helps.