I tried the test program given by Darrel Taylor - DT_INTS-14 - Blinky Light. It uses Timer1 to blink an LED at a constant rate, no matter what the main code is doing. This is one of the impressive demos of his great DT-Interrupts.

My idea is to use 16F88 in a power supply circuit with triac. This will be used for power tools like angle grinder that normally do not come with variable speed control. The problem is that the code does not work in a 16F88 while it works beautifully in a 16F628A. The LED blinks at about 1Hz rate in 16F628A but in 16F88 the LED is off or stays permanently lit. I have followed all the instructions and checked the code several times. I cannot spot any mistake in my code for 16F88. I guess, this issue may be related to the number of banks, memory size, etc. according to which some changes may have to be made in the DT_INT software. As per Darrel's instructions, the changes to be made are indicated by the error messages that appear when compiling is done. After I uncommented the line ";wsave VAR BYTE $70 SYSTEM", the compiling went through fine for both the PICs. But only 628A executes the code as desired.

Though tragically, Darrel is not with us, there are other knowledgeable PIC enthusiasts who can help me out.

The codes for both the PICs are given below. I would highly appreciate some hints or suggestions that will help me to solve the problem.

Regards,
Bala

Code for 16F628A:
'************************************************* ***************
' DT__Ints-14-Test-02.pbp Date: 23-Mar-15 No. of words: 216

' This code is a demo of Instant Interrupts by Darrel Taylor.
' An LED is connected to PortB.2 through a 1K resistor. Using TMR1 interrupt,
' the LED is made to blink at a constant rate, irrespective of what the main
' code is executing.
'
'Result: Works beautifully!
'************************************************* ***************

'PIC Used: 16F628A
;---------------------------------------------------------------------------
;wsave VAR BYTE $20 SYSTEM ' location for W if in bank0
wsave VAR BYTE $70 SYSTEM ' alternate save location for W
' if using $70, comment wsave1-3

' --- IF any of these three lines cause an error ?? ------------------------
' Comment them out to fix the problem ----
' -- Which variables are needed, depends on the Chip you are using --
;wsave1 VAR BYTE $A0 SYSTEM ' location for W if in bank1
;wsave2 VAR BYTE $120 SYSTEM ' location for W if in bank2
;wsave3 VAR BYTE $1A0 SYSTEM ' location for W if in bank3
' --------------------------------------------------------------------------
LED2 VAR PORTB.2

INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts

asm
__CONFIG _FOSC_INTOSCIO & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
endasm

TRISA = %00100000 'PortA: All except 5 are outputs
TRISB = 0 'PortB: All are outputs
CMCON = 7 'Disable comparator

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

T1CON = %00110001 ;Prescaler = 8, TMR1ON
@ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts

Main:
PAUSE 1
GOTO Main

'---[TMR1 - interrupt handler]--------------------------------------------------
ToggleLED2:
TOGGLE LED2
@ INT_RETURN

Code for 16F88:
'************************************************* ***************
' DT__Ints-14-Test-02.pbp Date: 23-Mar-15 No. of words: 274
'
' This code is a demo of Instant Interrupts by Darrel Taylor.
' An LED is connected to PortB.2 through a 1K resistor. Using TMR0 interrupt,
' the LED is made to blink at a constant rate, irrespective of what the main
' code is executing.
'
'Result: No luck. On 16F88 the code does not work for some reason.
'************************************************* ***************

'PIC Used: 16F88
;---------------------------------------------------------------------------
;wsave VAR BYTE $20 SYSTEM ' location for W if in bank0
wsave VAR BYTE $70 SYSTEM ' alternate save location for W
' if using $70, comment wsave1-3

' --- IF any of these three lines cause an error ?? ------------------------
' Comment them out to fix the problem ----
' -- Which variables are needed, depends on the Chip you are using --
;wsave1 VAR BYTE $A0 SYSTEM ' location for W if in bank1
;wsave2 VAR BYTE $120 SYSTEM ' location for W if in bank2
;wsave3 VAR BYTE $1A0 SYSTEM ' location for W if in bank3
' --------------------------------------------------------------------------
LED2 VAR PORTB.2

INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts

asm
__CONFIG _CONFIG1, _FOSC_INTOSCIO & _MCLRE_ON & _WDTE_ON & _PWRTE_ON & _LVP_OFF & _CPD_OFF & _BODEN_ON & _CCPMX_RB0 & _FCMEN_ON & _IESO_ON & _DEBUG_OFF & _WRT_OFF
endasm

TRISA = 0
TRISB = 0
CMCON = 7 'Disable comparator
ANSEL = 0 'All I/O pins are digital
ADCON0.0 = 0 'Switch off ADC


ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR0_INT, _ToggleLED2, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM

OPTION_REG = OPTION_REG & $80 | 1 ; Set TMR0 Prescaler to 256, leave RBPU alone
@ INT_ENABLE TMR0_INT ; enable Timer 0 interrupts

Main:
PAUSE 1
GOTO Main

'---[TMR0 - interrupt handler]--------------------------------------------------
T0Count VAR WORD
ToggleLED2:
T0Count = T0Count + 1
IF T0Count = 512 THEN T0Count = 0 : TOGGLE LED2
@ INT_RETURN
'--------------------------------------