Help programming ping)))
John7
Posts: 1
Hello,
I'm a student from Fontys Hogescholen in Eindhoven (Netherlands).
I have a question, i'm using the ping))) for measuring distance for our
robot.
I want program this sensor in C with a pic18f4550 microcontroller.
Is it possible to help me writing a program in C.
Greetings John Wijnen
I'm a student from Fontys Hogescholen in Eindhoven (Netherlands).
I have a question, i'm using the ping))) for measuring distance for our
robot.
I want program this sensor in C with a pic18f4550 microcontroller.
Is it possible to help me writing a program in C.
Greetings John Wijnen
Comments
1) The I/O pin has to be made an output low, then the output has to be pulsed high for a few microseconds (at least 5us), then back to low for a few microseconds.
2) The I/O pin has to be made an input and the microcontroller has to wait (roughly 750us) for the input to go from low to high.
3) The microcontroller has to time how long the input pulse remains high, up to 18.5ms
4) There is a minimum of about 200us before this cycle can begin again.