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.

TMS570LS3137: TMS570LS31HDK

Part Number: TMS570LS3137

Hello,

I am working on the TMS570LS31HDK. I am trying to interface HC-SR04 ultrasonic sensor to the board. I am having doubts on how to get duration in microseconds from the echo pin from the sensor to calculate the distance using edge interface functions through het. Can you please help me regarding this?

Thank You.

  • Hello,

    N2HET module on TMS570LS3137 device can be used to detect the edge of the input signal, and calculate the duration between the edges.

    PCNT instruction: It captures the high/low pulse time or periods of the input signal