We want to use PCA9685 to generate PWM signal for control. The PCA9685 is driven by a Renessas MCU. We try to write/read the MODE1 register by using following driver code. However, we find that the read register always return 0xFF. Below is screen capture and attached please find the logic analyzer data. Please comment.
MSB = PCA9685_read_byte(PCA9685_MODE1_REG);
Please try to add some delay between your write and read functions. As you can see in Table 15 of the datasheet, the Tbuf time is min. 4.7 us in the Standard mode, while in your case it seems to be 2.5 us only.
Hope it helps!
Looking once again at your captured I2C traffic, it appears that your PCA9685_read_byte() function requires some modification. The first two bytes are correct, but they need to be followed by a repeated start condition (which is not visible in the captured data) and the I2C address again with the R/W bit high (0xF9).
So you should see:
Setup Write to [0xF8] + ACK
0x00 + ACK
Setup Read to [0xF9] + ACK
0x01 + NAK