Ultrasonic range sensor HC-SR04 using PIC16F877A

ligogeorge:
Try the following link, it will help you
Interfacing HC-04 Ultrasonic Sensor with PIC Microcontroller

I think that after two-and-a-bit years, they will already have found that.