pasicr
Advanced Member level 1
Hi, I use countdown timer (4 digit) with pic16f84a for control heat element ( on heat element I put 220V AC via reley until timer coundown), but I have one problem. Everiting is fine when timer show 0000 after that heat element is off. When I press start timer button again on display show predefined time and Problem is heating element is ON when timer stop and show start number. May be is not clear explanation.
code for control reley is
ALARM
FINALWAIT BSF PORTB,RB4 ; set up reley ON
MOVLW 2 ; delay 2 milliseconds
CALL NMSEC
MOVLW 2 ; another 2 msec delay
CALL NMSEC
BTFSC PORTB,START_PB ; start button pressed
GOTO FINALWAIT ; not yet
CALL DLY20 ; debounce just to make sure
BTFSC PORTB,START_PB ; second look
GOTO FINALWAIT ; nah, keep waiting
BCF PORTB,RB4 ; set reley OFF THIS COMMAND NOT WORK
CALL WAITSTARTUP ; now wait for the switch up
GOTO EE2D ; start all over againSOUNDALARM
Please Help me some body, I send all code
regards
code for control reley is
ALARM
FINALWAIT BSF PORTB,RB4 ; set up reley ON
MOVLW 2 ; delay 2 milliseconds
CALL NMSEC
MOVLW 2 ; another 2 msec delay
CALL NMSEC
BTFSC PORTB,START_PB ; start button pressed
GOTO FINALWAIT ; not yet
CALL DLY20 ; debounce just to make sure
BTFSC PORTB,START_PB ; second look
GOTO FINALWAIT ; nah, keep waiting
BCF PORTB,RB4 ; set reley OFF THIS COMMAND NOT WORK
CALL WAITSTARTUP ; now wait for the switch up
GOTO EE2D ; start all over againSOUNDALARM
Please Help me some body, I send all code
regards