View Single Post
  #4   Spotlight this post!  
Unread 02-02-2008, 18:40
David Fort David Fort is offline
Registered User
FRC #1001
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2003
Location: Cleveland, OH
Posts: 26
David Fort is on a distinguished road
Re: Ultrasonic sensors on digital ports 3-6 problems

I didn't look at your code, but will remind you that interrupts 3-6 are change of state, and 1-2 are edge triggered (or something like that). The point is that any change on any pin in the 3-6 range will fire the same interrupt, where for 1 and 2 you get a different vector. I also remember something about cautionary tales about re-reading the status register. Maybe the real point is that I don't remember how they are different but 3-6 behave differently than 1 and 2, so dig into the PIC datasheet for details.

Also note that the rise time of inputs greater than 6 is different than for the first 6.

see http://hacksaw.brush.googlepages.com/2006images for a picture of the signal.