Thread: interupts 3-6??
View Single Post
  #6   Spotlight this post!  
Unread 26-01-2007, 14:55
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,673
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: interupts 3-6??

I think you have to read the entire port to be able to clear the flag, but reading a single pin might work. What happens is if you don't clear the mismatch by reading the entire port, or maybe reading one pin, is the flag continues to be set over and over, and you'll keep jumping back into your ISR. So if you try your way and get a red light of death, you'll know why.

Second point. Your method works if you only care about 0 to 1 transitions on the pin. 1 to 0 transitions will still cause interrupts and you'll still have to service them, however. So using interrupts 3-6 when you only care about 0 to 1 transitions is pretty wasteful of your resources and you'll only be able to service half as many interrupts as you'd other wise be able to.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter