I try to measure time elapsed between two events using Timer1 : (when variable Estatus remains =1) I use Pic 16F677
I understand that overflow time of counter TM1 using 4 Mhz and Prescalers of 1, 2, 4, 8 should be 65, 131,262 and 524 msec but I always get a tick time of 76 msec in spite of using diferent prescalers through T1COM.4 and T1COM.5 settings
Can someone suggest any hint to explain and avoid it?
Regards
-Francesc

Here is my code:
DEFINE LCD_DREG PORTC 'Define PIC port used for LCD Data lines
DEFINE LCD_DBIT 4 'Define first pin of portc connected to LCD DC4
DEFINE LCD_RSREG PORTC 'Define PIC port used for RS line of LCD
DEFINE LCD_RSBIT 3 'Define Portc pin used for RS connection
DEFINE LCD_EREG PORTC 'Define PIC prot used for E line of LCD
DEFINE LCD_EBIT 2 'Define PortC pin used for E connection
DEFINE LCD_BITS 4 'Define the 4 bit communication mode to LCD
DEFINE LCD_LINES 2 'Define using a 2 line LCD
DEFINE LCD_COMMANDUS 2000 'Define delay time between sending LCD commands
DEFINE LCD_DATAUS 50 'Define delay time between data sent.

@ DEVICE pic16F677, INTRC_OSC_NOCLKOUT
@ DEVICE pic16F677, WDT_ON
@ DEVICE pic16F677, BOD_ON
@ DEVICE pic16F677, PROTECT_OFF
@ DEVICE pic16F677, PWRT_ON
@ DEVICE pic16F677, MCLR_OFF

TRISA=%11111111 ' A Register as input
TRISB=%11111111 ' B Register as input
TRISC=%00000000 ' C Register as output
CM1CON0=0 ' Comparator disabled
CM2CON0=0 ' Comparator disabled
ANSEL=%00001111 ' analogic=1 digital=0
ANSELH=%1110100 ' analogic=1 digital=0
T1CON.3=1 ' Timer1 oscilator enable
T1CON.1=0 ' Internal clock Fosc/4

OT var PORTB.5 ' Entrada Obrir/Tancar diafragma
OShutter var PORTC.0 ' Sortida obrir shutter
TShutter Var PORTC.1 ' Sortida tancar shutter
Estatus var bit ' Estatus=1 diafragma obert
ShTemps var Word

INICI:
Pause 1000
lcdout $fe, 1 ' Clear LCD

Convertidor:
on interrupt goto tickcount
lcdout $FE, $80,"Test Timer1" ' Position cursor at home 1ª linea
Pause 300

SwitchOT:
while OT=1
goto convertidor
wend
Pause 20
If estatus=0 then
GOTO OpenShutter
Else
GOTO CloseShutter
endif
goto Convertidor

OpenShutter:
Oshutter=1
pause 50
Oshutter=0
Estatus=1 ' Shutter obert
INTCON.6=1 ' Enable all mask interrupts
INTCON.7=1 ' Enable global interrupts
T1CON.4=1 ' Prescaler timer=1:8
T1CON.5=1 ' Prescaler timer=1:8
PIE1.0=1 ' Enables TM1 overflow interrupt
T1CON.0=1 ' start TM1 clock
PIR1.0=0 ' Reset TM1 interrupt flag
LCDOUT $fe,$C0+13,40,32,41 '32=Tot Blanc
ShTemps=0
LCDOUT $fe,$C0," "
goto convertidor
CloseShutter:
TShutter=1
Pause 50
Tshutter=0
Estatus=0 ' Shutter tancat
T1CON.0=0 ' Stop Tm1 clock
INTCON.6=0 ' Disable all mask interrupts
INTCON.7=0 ' Disable global interrupts
LCDOUT $fe,$C0+13,40,255,41 '255=Tot Negre
goto convertidor

disable
Tickcount:
ShTemps=ShTemps+1
LCDOUT $fe,$C0,#ShTemps
resume
enable

end