View Single Post
  #4   Spotlight this post!  
Unread 15-12-2003, 13:01
Larry Barello Larry Barello is offline
http://www.barello.net
#0492 (Titan Robotics Club)
Team Role: Mentor
 
Join Date: Jan 2002
Location: Bellevue, WA
Posts: 85
Larry Barello has a spectacular aura aboutLarry Barello has a spectacular aura about
Re: EDU Interrupt and Timer Template Code

I wrote a small quadrature encoder interface using RB4-7 (ifi interrupt 3-6) and ran across a problem that doesnt appear to be addressed in your code: If you call a subroutine from an interrupt handler, you need to save additional stuff. You can find this in the C compiler in section 2.9 (something) or on the quick reference card. You need to replace

#pragma interrupt InterruptHandlerLow

with

#pragma interruptlow InterruptHandlerLow save=section(".tmpdata")

For more info, see below:

http://www.chiefdelphi.com/forums/sh...91&postcount=4