Hello,
My code has the following line:
TMR1IF_BIT VAR PIR1.0
I use it to check for Timer 1 overflow. I am compiling for the 16F877 PIC.
For this PIC, TMR1IF is PIR1.0, If I move this code to another type of PIC,
the TMR1IF bit may be at some other bit on the PIR1 register.
In C:/PBP/INC/M16F87X.INC is a section that defines bit numbers for
all the pins in the PIR1 SFR (Special Function Register).
Is there anyway for me to use those symbols in my PicBasic source code ?
I would like to write code like:
Code:
TMR1IF_BIT VAR PIR1.TMR1IF
IF TMR1IF_BIT = 1 THEN
TMR1IF_BIT = 0
; Reset timer to new value ....
ENDIF
So that I do not have to worry about what bit the TMR1IF is when changing
PICS.
Thanks,
Keith
Bookmarks