Hello,
I have a question about the interrupts. I have a simple program which uses the TMR0 interrupt. Then I have a task which is using HSERIN / HSEROUT and this task is executed each minute. But looks like, that this task cause, that the TMR0 interrupt is not correctly managed, I am loosing seconds when the task is running. I am trying to findout why, because for the waiting operation I am using e.g. this routine, which should not block the OnInterrupt:

pauseWithInterrupt:
for k=0 TO 1200
PAUSE 1
NEXT k
return

My question is what will happen, if I have e.g. the command:

HSERIN 100, retMail2, [wait ($0D, $0A, $0D, $0A), STR COMMAND\96\$0D]

And the TMR0 interrupt will arrive, when the HSERIN is waiting. Based on the manual, I expect, that the program will jump to On Interrupt after the HSERIN command will finish. Is it true? It cannot happen, that the interrupt is lost?

Becuase I have in On Interrupt:
On Interrupt Goto intManagement

disable
intManagement:
if (INTCON.2 == 1) then
ticks = ticks + 1 ' Count pieces of seconds
If ticks < 61 Then tiexit
toggle ACTIVITY_LED
ticks = 0 'One second elasped - update time
if (skipSecIncr <> 1) then second = second + 1
skipSecIncr = 0
tiexit:
INTCON.2 = 0
endif
INTCON.7 = 1
resume

Because I was thinking, if the TMR0 interrupt is fired and I will not perform the INTCON.2 = 0 and INTCON.7 = 1 then the TMR0 is not increased - not counted. So I should not do any operation, which will take more than 16 ms. Is it true?

I am using this setting:

'interrupt for timer
T0CON = $C5
RCON.7 = 0
INTCON = $a0 'enable TMR0 interrupts and global interrupt


I think, the possible solution, how to prolong this 16 ms period is to use prescaller for TMR0.
But my general question is if TMR0 interrupt is running all the time, even if the INTCON.2 = 1
and INTCON.7 = 0

I am using the PIC 18F2520
Thanks Robert