It's not in there...kinda/sorta between the lines it is...kinda...
If you're using the 'On Interrupt', PBP won't check 'Interrupts' until it's finished executing the current command.
So, for example, if you've set up the progam to get a TMR interrupt every 100ms, and you've got a 500ms pause, you'll most likely miss 4-6 timer interrupts, because PBP is busy concentrating on the PAUSE (or ignoring the interrupts, whichever way you like it.
It's not because you're using the internal clock, it's the way you've got it set up.
If you use a short pause in a loop to create a longer pause, you'll get more repeatable results over a larger range of pauses.
There are other ways of doing this, but this should get you started...
Another thought...you might NOT want to use TMR as a variable...too close to TMR0, TMR1, etc.etc...
DEFINE RESET_ORG 800h
DEFINE OSC 32
DEFINE LCD_LINES 4
define LCD_DREG PORTD
DEFINE LCD_RSREG PORTC
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTC
DEFINE LCD_EBIT 1
osccon=$f0 : osctune=$c0 : intcon=$a0 : t0con=$97 : tmr var word : temp var word
on inter rupt goto SetTime
TMR = 0
enable
start: LCDout $FE,1, "timer: " , #tmr
for temp = 1 to 500
pause 1
next temp
goto start
disable
SetTime:
TMR = TMR + 1 : resume
enable
end
EDIT: I see Dave beat me to the punch!
Bookmarks