PDA

View Full Version : ReEnterPBP.bas question



ronjodu
- 13th December 2007, 23:31
While making some changes to an existing program by adding a bunch of if/or comparison statements I received the warning (temp variables exceed T8). I needed to increase to T16 to get the program to compile without error. I know in time I should rewrite the program using Select Case but for now what pitfalls should I expect if any, by using it this way? Is there a reasonable limit to the number of Temp Variables I should use in a program? Calculating the time to save at 4 mhz I get 116 us.

At this point I'm only using TMR1_INT but will add at least INT_INT in time.

Thanks for any responses.



16f876, PBP2.50, MCSP, MPASM,MCloader

Darrel Taylor
- 14th December 2007, 03:53
It's really just a warning.

There's no way for it to know how many (T)emp variables you are using in your interrupt routines, or how many are used in the main progam. And it's only set up to handle 7 Temp variables (18F's), so it throws a warning if there's more.

Usually, interrupt handlers are fairly simple, and don't use many (if any) (T)emp variables.

But you should check to make sure there aren't any "Really Complex" formula's inside the interrupt handler.

If you are sure that no more than T7 is used in the handlers, use ...

DEFINE NO_T7_WARNING 1

HTH,