RstBtnPress:
PAUSE 70 ' debounce
if portb.0 = 0 then ' if btn still down after debounce
PAUSE 1000 ' Wait 1000ms more
if portb.0 = 1 then ' if button has been let go in < 1000ms
gosub brightlcd ' increase lcd backlight
gosub LcdBothOn
LCDOUT $FE,1 ' clear both lcds
gosub Lcd1on
LCDOUT $FE,$80, "****************************************" ' Clear display and show that
LCDOUT $FE,$C0, "* ALARM DISABLED *" ' Clear display and show that
gosub Lcd2on
LCDOUT $FE,$80, "* *" ' Clear display and show that
LCDOUT $FE,$C0, "****************************************" ' Clear display and show that
alarmsilence = 1
endif
PAUSE 2000 ' Wait 2000ms
if portb.0 = 0 then ' if btn still down after another 2000ms (alarm on)
gosub brightlcd ' increase lcd backlight
gosub LcdBothOn
LCDOUT $FE,1 ' clear both lcds
gosub Lcd1on
LCDOUT $FE,$80, "****************************************" ' Clear display and show that
LCDOUT $FE,$C0, "* ALARM ENABLED *" ' Clear display and show that
gosub Lcd2on
LCDOUT $FE,$80, "* *" ' Clear display and show that
LCDOUT $FE,$C0, "****************************************" ' Clear display and show that
alarmsilence = 0
endif
endif
@ INT_RETURN ' Return to main program