Try something like this to see how it goes.
It just waits to free the button.
I know Darrel will spank me for this, but hey, it is just for testing!
Ioannis
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
while portb.0=0:pause 10:wend
@ INT_RETURN
end
Bookmarks