I would try moving the HSEROUT line to the interrupt routine. The HSEROUT command takes some time to execute and that might be causing a conflict with the interrupt timming.

Quote Originally Posted by AndrijaD View Post
16f628a
DEFINE OSC 4
define HSER_RXSTA 90H
DEFINE HSER_TXSTA 20H
DEFINE HSER_BAUD 2400
DEFINE HSER_SPBRG 25H
INCLUDE "DT_INTS-14.bas" ; Base Interrupt System
INCLUDE "ReEnterPBP.bas" ; Include if using PBP interrupts
VREMEOBRTA VAR WORD

ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler INT_INT, _RB0PREKID, PBP, yes
INT_Handler TMR1_INT, _PREKORACENJETMR1, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM

@ INT_ENABLE INT_INT ; enable external (INT) interrupts
@ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts

T1CON.0 = 1

Pocetak:

' hserout [VREMEOBRTA.LOWBYTE,VREMEOBRTA.HIGHBYTE]
GOTO Pocetak

RB0PREKID:
T1CON.0 = 0
VREMEOBRTA.LOWBYTE = TMR1L
VREMEOBRTA.HIGHBYTE = TMR1H
hserout [VREMEOBRTA.LOWBYTE,VREMEOBRTA.HIGHBYTE]
TMR1L = 0
TMR1H = 0
T1CON.0 = 1
@ INT_RETURN

PREKORACENJETMR1:
TMR1L = 0
TMR1H = 0
@ INT_RETURN

end