View Single Post
  #3   Spotlight this post!  
Unread 14-03-2008, 12:08
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: General question.

Gear tooth sensor is a phased interrupt as I recall, making it digital. It pulses once per tooth, and you count these in an ISR.

as for your original question... I'm not sure what language you're trying to use.

In MPLAB/C18 C, syntax would be

Code:
if(condition1){
  //code to run if condition1 is true
}else if(condition2){
  //code to run if condition2 is true and condition1 is false
}else{
  //code to run if both condition1 and condition2 are false.
}