Don't do this: while(!Wire.available());. Remove that line please.
First of all, use a I2C Scanner sketch to find the I2C address of the Slave. Is it really 0x08 ?
Your capture shows 0x10, which converted to the 7-bit shifted I2C address makes 0x08, but I want to be sure.
Please just send the data. When solving a problem, don't make it more complicated.
Notice that when reading data, there is no STOP condition in the middle. There is a second START.
A START without a previous STOP is called a "repeated start".
Wire.beginTransmission( 0x08);
Wire.write( 0x40);
Wire.endTransmission( false); // 'false' for a repeated start
int n = Wire.requestFrom( 0x08, 1);
if( n == 1)
{
byte lsb = Wire.read();
Serial.print( lsb);
}
else
{
Serial.println( "No data received");
}
When there was something wrong, the Wire.requestFrom() returns zero or the Wire.available() is zero. Then there is no data, and Wire.read() will return -1. The -1 pushed into a byte will result into 0xFF.
Do you see that small spike in the capture ? You may ignore it. That happens sometimes.
This is not all. There could be a voltage mismatch on the bus, timing issues, weird things that are not according to the I2C standard, and so on.
Can you put code between code-tags ? The </> button is for code tags.
Can you show the whole sketch ?
Yes, a 'scope is better for checking the logic waveform - a logic analyzer may have its threshold
voltage set differently from the microcontroller (in fact this is inevitable really), so if its something
to do with the bus drive voltages / pullup strength etc, the LA may lie to you, whereas a 'scope
will not lie.
Try the following codes (your snippet with correction/adjustment): (Are you sure that your Slave is expecting lower byte first. Please, provide a link to your slave.)