View Single Post
Old 05-25-2009, 03:03 AM   #1387 (permalink)
esoneson
EcoModder Student
 
esoneson's Avatar
 
Join Date: Nov 2008
Location: Youngsville, NC
Posts: 117
Thanks: 11
Thanked 14 Times in 13 Posts
Interrupt Service Routines

If the amount of time to perform the critical task takes longer than the interim of the interrupt, then your design is flawed. Take note of the word critical. Paul, I think you have solved your problem by shortening the critical code to fit within the interim. If not, then you would have to break up your interrupt routine into states and run sub-portions of the critical code in some sort of state machine. But then again, if what you are doing HAS to be performed within a single interrupt interim, you would be continually getting behind so as to not meet the designed criteria, which is, to perform x number of interrupt routines each second of real time. If the interrupt was initiated on a non-regular basis, then saving critical information and queuing up tasks to be performed at a later non-critical time is proper. But this is not your case at all. Glad to see you got the instructions minimized.

Carry on my friend. You are doing fine.

Eric
__________________
1995 BMW 318i EV in the making
  Reply With Quote