DT_INTS-18 - problem with INT0
Hi,
I'm using DT_INTS to interrupt on INT0 for a PIC 18F4431
The interrupt works fine but seems to trigger on both arising and falling edge.
Tried to configure the PIC to only look at the falling edge but it doesn't seem t0 make any difference.
Here's a snip of the troublesome code, what am I doing wrong ? Is there a parameter inside the DT_INTS I need to set ?
Code:
' set fuses - USE INC FILE FOR NOW
include "modedefs.bas" ' serial modes
INCLUDE "DT_INTS-18.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP-18.bas" ' Include if using PBP interrupts
' ---- setup registers ----------------------------
ADCON0 = 0 ' A/D off
ADCON1 = 0
ADCON2 = 0
ADCON3 = 0
ANSEL0 = 0 'digital i/o
ANSEL1 = 0
INTCON.4 = 1 'enable INT0
INTCON2.7 = 0 'pullups on
INTCON2.6 = 0 ' Int 0 on falling edge of C3
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler INT0_INT, _ManualFire, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
'---[INT0 - interrupt handler]--------------------------------------------------
ManualFire:
Camera_meter = 1
Camera_shutter = 1
pause 10
Camera_meter = 0
Camera_shutter = 0
@ INT_RETURN
end