I set INTCON bit but not working on falling edge.
Code:' chip PIC18F4550 DEFINE OSC 48 INCLUDE "MODEDEFS.BAS" include "MYLCD.BAS" CMCON = 7 ADCON1 = 15 CVRCON = %00000000 'CVref turned off TRISB = %11111111 w0 var word pause 500 '-------------------------[ INT0 Interrpt setting ] ----------------------------- INCLUDE "DT_INTS-18.bas" ; Base Interrupt System INCLUDE "ReEnterPBP-18.bas" ; Include if using PBP interrupts ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler INT0_INT, _ToggleLED1, PBP, yes INT_Handler INT1_INT, _ToggleLED2, PBP, yes endm INT_CREATE ; Creates the interrupt processor INCON2.5 = 0 ; External INT1 on Falling edge ENDASM @ INT_ENABLE INT0_INT @ INT_ENABLE INT1_INT '__________________________________________________________________________________ start: lcdout $fe,1 lcdout "count = ",dec5 w0 pause 200 goto start ToggleLED1: w0 = w0+1 @ INT_RETURN ToggleLED2: w0 = w0+1 @ INT_RETURN




Bookmarks