Hi,
Could you please tell me the reason why "MSB << 8 (8-bit left shift)" is applied when calculating the distance between the transducer on PGA460 and the target object ?
Best regards,
Kato
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
Could you please tell me the reason why "MSB << 8 (8-bit left shift)" is applied when calculating the distance between the transducer on PGA460 and the target object ?
Best regards,
Kato
Hi Kato-san,
UART Command 5 in Table 3 shows that Bytes 1-2 are the MSB and LSB bytes of the object time of flight in microseconds. The time of flight value is a 16-bit value, so the MSB and LSB 8-bit bytes must be concatenated to create the 16 bit value. This is why the 8-bit left shift is applied in the conversion to distance equation.
For example, if UART Command 5 returns the following values for one object: 0x{40,1B,62,23,68,B6}, then the raw values are:
Whereby the time of flight in microseconds is 0x1B62 = 7010us --> 1.2m in distance.