Well, I think it goes like this (please, somebody correct me if I'm wrong)
(main program) --> Do the counting (5000 for Comp1Time) Uses TMR1 to count
Comp1 interrupts: store Comp1Time -> clear TMR1
(returns to main program) --> Do the counting (X for Comp2Time) Uses TMR1 to count
Comp2 interrupts: store Comp2Time
(returns to main program) --> Do the counting (5000 for Comp1Time) Uses TMR1 to count
Comp1 interrupts: store Comp1Time -> clear TMR1
and so on ..... This is for the last code that you have posted.
Robert
Last edited by rsocor01; - 15th September 2010 at 10:10.
"No one is completely worthless. They can always serve as a bad example."
Anonymous
Bookmarks