G'day all you smart people. Would someone be so kind as to help me out with an interrupt (and Timer1) problem. Sometimes we old blokes get caught up with all this new technology.
I have been playing with PICs for a few years, but this is the first time I have used interrupts or Timer1.
This is the reelvent code:


Blah, Blah, usual setup stuff here.


T1CON = %00111001 '1:8 prescaler

PRESET = 12000

'This should load the counter
'ELAPSED = 0
MAINLOOP:
T1CON.0 = 0 'stop the clock
TMR1H = PRESET.highbyte 'RELOAD THE COUNTER
TMR1L = PRESET.Lowbyte ' "
T1CON.0=1 'START THE CLOCK
PIR1.0=0
ON INTERRUPT GOTO TICKER
PIE1.0=1
INTCON.6=1
INTCON.7=1
LCDOUT $fe,1, elapsed 'this is only for seeing what happens - 'NOT required in final
TOGGLE PORTB.5 'nor this bit
ELAPSED = ELAPSED + 1

GOTO MAINLOOP

DISABLE
TICKER:
T1CON.0 = 0 'stop the clock
TMR1H = PRESET.highbyte
TMR1L = PRESET.Lowbyte
'PAUSE 1000
'toggle portb.5 'same as above note
T1CON.0=1
PIR1.0=0



RESUME
ENABLE

OK, when I look at the LCD and Portb.5 in the mainloop, the port line toggles OK, the LCD is too fast to read, but something is on the display, just can't see it.....So far so good.
When I disable the LCD and port in mainloop and enable it in the interrupt loop, the port line does not toggle, neither does the LCD show anything.
Quite obviously the thing is not jumping to the interrupt handler, or an interrupt is not being generated.
I have to ask someone for some help, as I ain't got any hair left to pull out. Been working on this now for 3 nights.........

Thank you, in advance,
Peter Moritz.