View Single Post
  #3   Spotlight this post!  
Unread 09-02-2007, 23:26
TimCraig TimCraig is offline
Registered User
AKA: Tim Craig
no team
 
Join Date: Aug 2004
Rookie Year: 2003
Location: San Jose, CA
Posts: 221
TimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to behold
Re: Disable Encoders Problem

Quote:
Originally Posted by Alan Anderson View Post
There is only one (low-priority) interrupt handler. It will be called when any interrupt occurs, and the handler has to check all the possible sources in order to service the interrupt properly.
Yes, I understand this part. Not as nice as processors that have a separate vector for each interrupt but beggars can't be choosers, I guess.

Quote:
Originally Posted by Alan Anderson View Post
The program won't know not to deal with a flag for a disabled interrupt unless you also check the associated enable bit. You don't really want a serial port interrupt to end up running the service routine for a "disabled" encoder.
This is where I part company with MicroChip's implementation. If you don't enable the interrupt, it should never set the interrupt flag for that interrupt, in my opinion, because an interrupt should not have occurred. I guess one more reason I'll probably opt for something other than PICs for my personal projects.