please use code tags
you have not provided wsave vars
the config directive you have used will not compile in pbp3 ,its wrong
so what is INCLUDE "DT_INTS-14_MOD.bas" ; Base Interrupt System ; Attention ! Modified file ! , whats in it
GPIF_INT ??? dt ints has no such interrupt
this will compile , but will it work ?
Code:
'===12F683======
#CONFIG
__config _INTOSCIO & _WDT_ON & _PWRTE_OFF & _MCLRE_ON & _CP_OFF & _CPD_OFF & _BOD_ON & _IESO_ON & _FCMEN_ON
#ENDCONFIG
CLEAR
OSCCON =%01110001
DEFINE OSC 8
CMCON0 =7
TRISIO =%00001000
GPIO =0
ADCON0 =0
ANSEL =0
CCP1CON=0
ZeroLine VAR GPIO.3
Out VAR GPIO.5
CountVal VAR WORD
INCLUDE "DT_INTS-14.bas" ; Base Interrupt System ; Attention ! Modified file !
INCLUDE "ReEnterPBP.bas" ; Include if using PBP interrupts
;-- Place a copy of these variables in your Main program -------------------
;-- The compiler will tell you which lines to un-comment --
;-- Do Not un-comment these lines --
;---------------------------------------------------------------------------
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
' --------------------------------------------------------------------------
PAUSE 20
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler GPC_INT, _KES, PBP, yes
endm
INT_CREATE
ENDASM
IOC.3 = 1
@ INT_ENABLE GPC_INT
Begin:
CountVal=0
Start:
SELECT CASE CountVal
CASE IS > 200
CountVal=0
CASE IS > 100
Out=0
CASE IS > 50
Out=1
END SELECT
GOTO Start
KES:
IF ZeroLine THEN CountVal=CountVal + 1
@ INT_RETURN
END
Bookmarks