GTS Counting
I have installed the GTS sensors on both sides of the robot. The documentation indicates that the pulse from the sensor is a 39 microsecond wide rising pulse for a clockwise rotation and an 83 microsecond wide pulse for a counter-clockwise rotation. How would one differentiate between the widths of the pulses in the interrupt handler?
I have a feeling that I need to set the interrupt to fire and high and low transitions, and use a timer to monitor the length of the pulse. However I have no idea how to set that up on the PIC. Is there any documentation or example code I should be aware of? Can a timer even measure in microseconds?
Thanks in advance,
Robinson
__________________
'... who are you, then?'
'I am part of that power which eternally
wills evil and eternally works good.' Goethe, Faust
Last edited by gnirts : 21-02-2006 at 11:20.
|