SetUp
Delay
Main
Main1
Main2
|
ORG 0
BSF 03,5
CLRF 06
MOVLW 01
MOVWF 05
BCF 03,5
CLRF 1F
CLRF 06
GOTO Main
NOP
DECFSZ 1A,1
GOTO Delay
DECFSZ 1B,1
GOTO Delay
RETURN
BTFSS 05,0
GOTO Main2
BTFSC 1F,0
GOTO Main
NOP
NOP
NOP
NOP
DECFSZ 1A,1
GOTO Main1
BTFSS 05,0
GOTO Main2
BSF 06,0
CALL Delay
CALL Delay
BCF 06,0
BSF 1F,0
GOTO Main
BCF 1F,0
GOTO Main
END
|
;This is
the start of memory for the program.
;Go to Bank 1
;Make all port B output
;Load W with 0000 0001
;Make RA0 input
;Go to Bank 0 - the program memory area.
;Clear the button-press file
;Blank the display
;Create approx 250mS delay
;Test the input line on port A
;Button not pressed
;Button pressed first time?
;Button already pressed
;Create short delay
;Look again
;Is switch still pressed?
;It was only noise
;Turn on LED
;Illuminate for 250mS
;Illuminate for 250mS
;Turn off LED
;Set button-press flag
;Loop Main
;Clear button-press flag
;Loop Main
|