|
Greetings all,
I'm using a homebuilt sonar based on Kam Leang's design, which seems to be
working quite well. I just have one question with regard to the timing on
the input port. I'm using the same sonar driver as for the polaroid - right
now I can't remember which input is used for the return "echo".
My question is, what is the maximum time that the timer can measure before
returning a -1? I'm curious, as I'd like to know the maximum distance I can
measure on the HB, so I can set my sonar unit up accordingly.
Thanks for your help
Adam
|
|
Message has 2 Replies: | | Re: Ultrasonic maximum timing
|
| (...) I think the register maxes out at 32767. Since it's a 2 MHz processor, this gives: (32767 cycles) / (2,000,000 cycles/second) = 0.01638 seconds Up here in the Rocky Mountains, the speed of sound is about one centimeter every 143 (...) (25 years ago, 16-May-00, to lugnet.robotics.handyboard)
| | | Re: Ultrasonic maximum timing
|
| (...) Except that I don't think it counts at 2Mhz, rather I think it counts at 500Khz (2 / 4 = ECLK) (I may be totally off base here, since I've not read the pink book in about 6 years) that would put your max at 32767/500000 = .0655 at 1000 ft/sec (...) (25 years ago, 16-May-00, to lugnet.robotics.handyboard)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|