denesio
Junior Member level 1
here is a code:
why in first time the message is printed to lcd (interrupt isr),
and second time is not (if (key == 4)).......
"key" is global variable..........
Code:
.
.
.
.
.
.
const char key_table[16] = "123A456B789C*0#D";
unsigned char key;
//unsigned char ex0_isr_counter = 0;
void ex0_isr (void) interrupt 0
{
//ex0_isr_counter++; // Increment the count
unsigned char keypad_scan;
key = ((keypad_scan=keypad_address)&keypad_mask);
key = key_table[key];
goto_xy(0,0);
putch_lcd(key);
}
.
.
.
.
.
.
.
while(1)
{
.
.
.
.
if (key == 4)
{
goto_xy(2,0);
putch_lcd(0xe4);
Puts("vse-vse");
}
.
.
.
.
}
why in first time the message is printed to lcd (interrupt isr),
and second time is not (if (key == 4)).......
"key" is global variable..........