View Single Post
  #7   Spotlight this post!  
Unread 18-01-2006, 23:43
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Interupts on the Pic18

Quote:
Originally Posted by Kevin Watson
Trying to capture a 38us pulse when you've got ~50us of latency is a problem. Yes, I know that I don't necessarily have to time the width of the pulse, I could simply check to see if the output is still high when my ISR code finally executes and if it's low, conclude the pulse width is narrower than my latency and therefore one of the 38us pulses flew by. But the problem is this solution is half-arsed and I don't do anything half-arsed <grin>. This and other possible solutions are being explored.
-Kevin
Just to add... I have had the same experience as Kevin. The problem is that even if you did the "half-arsed" solution (and I wouldn't recommend it either), one would still have the problem that the whole timing thing is offset by other interrupts that may be happening in the system.

I believe Kevin's right when he said to have hardware between the gear tooth sensor and the microprocessor to discriminate the pulse width and not leave it to the program.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute