I have tried but it didn't worked.
Currently its doing like this.
Manually: When Test button pressed RUN_TEST() called;
When MUTE button pressed RUN_Mute() called;
When ACK button pressed RUN_ACK() called;
When RESET button pressed RUN_RST() called;
Auto Mode:
When Test button pressed RUN_TEST() called;
When MUTE button pressed RUN_Mute() called;
When ACK button pressed RUN_ACK() called;
Here RunReset function automatically called.
Now I am looking for feature.Where once Test Button pressed RUN_Test() should be called. Wait for 1 min
within 1 min if any of key is not pressed automatically RUN_RST() should be called.else wait for other key to presses and other operation should be perform.
Code:
void int Test_Button_Counter=0;
void interrupt isr(void) {
if (TMR1IF) {
TMR1IF = 0;
TMR1H = 0xAF;
TMR1L = 0xC8;
if(bits.KeyLock_TEST1==1) {
Test_Button_Counter++;
if(Test_Button_Counter>200) {
Test_Button_Counter=0;
bits.AUTO_RESET =1;
}
}
}
INTF = 0;
}
void main() {
while(1) {
Key_CHK_TEST();
Key_CHK_MUTE();
Key_CHK_ACK();
if (bits.MANUAL_RESET == 1)
Key_CHK_RESET();
if (bits.AUTO_RESET == 1) {
RUN_RESET();
}
}
}