I have found when I suspect a bad PIC, it turns out that it is just doing what I programmed it to do.
Anyways, 50 to 200ms PAUSE's are way to long to wait since:ok I tried pause from 50 to 200 milliseconds but it will not respond until I comment the pause command out or remove
Max distance measured is 4M or 157.48 inches
And if I'm thinking straight, that works out to 157*15= 2362 counts
Then with PUSLIN at 10us per increment is 2362*10us = 23.62ms
So 23.62ms will be the maximum time measured for 4 meters. Unless I took a rong tern somewhere in the calculation.
Do you have a scope to see how long it actually takes to complete the pulse transmission?






Bookmarks