Hi TS & group,
I'm interfacing to an ultrasonic ranger with a TS-7260 board and have
decided to go through the XDIO port. Therefore, I chose to use the
XDIO port was because of the built-in pulse timer, but for some
reason, it's not properly measuring the time.
The ultrasonic ranger works on a very simple principal: PinA (output)
is set high by the uC, sending out an ultrasonic chirp, then PinB
(input) is set high by the device when the echo is detected. The time
difference betwen PinA going high and PinB going high is of prime
importance, because it's proportional to distance, and I would prefer
to measure this accurately (but with little overhead).
I assumed that the XDIO pulse timer would work, which would mean that
I would not have to
a) poll __constantly__ to determine exactly when a signal comes in, or
b) write a kernel mode device driver (using an IRQ and service
routine) to start / stop a timer.
The reasons against aforementioned options are
a) polling, especially doing so in a busy loop, is bad - I don't have
resources to waste
b) writing the kernel module is easy, but using it means that my code
isn't modular, userspace-driven, etc. I would need to compile the
driver against different kernels, distribute those modules, etc.
Has anyone else worked with the XDIO code for a similar purpose? My
code is attached - if you can suggest anything I would be grateful.
Cheers,
Chris
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|