|
Re: Determining pulse width for the GTS?
Billy,
Use an interrupt pin that interrupts on both rising and falling edges and read a timer (like Timer 3) to measure time.
Hint: This problem is exactly the same as using an ultrasonic transducer... There have been a lot of code fragments posted about using that device in the past.
Regards,
Mike
__________________
Mike Betts
Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013
As easy as 355/113...
|