Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/06/07 09:19
Read: times


 
#138682 - external interrupt using by keypad encoder 74c922
here is a 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..........

List of 19 messages in thread
TopicAuthorDate
external interrupt using by keypad encoder 74c922            01/01/70 00:00      
   that code does not compile            01/01/70 00:00      
      it is wotking now...            01/01/70 00:00      
   reply            01/01/70 00:00      
      strongly and totally disagree            01/01/70 00:00      
   Have you carefully read the datasheet?            01/01/70 00:00      
      what good would that do?            01/01/70 00:00      
         Apparently, you haven't done that either, Erik            01/01/70 00:00      
            Misread?            01/01/70 00:00      
            922 and 922            01/01/70 00:00      
               Here we go again ...            01/01/70 00:00      
                  Why ASM            01/01/70 00:00      
                     Fundamental misconception            01/01/70 00:00      
                        nope, here is the correction            01/01/70 00:00      
               what about, for a change, answering a question?            01/01/70 00:00      
                  If you can\'t do it in ASM, you can\'t do it at all.            01/01/70 00:00      
   LCD Routine take time.            01/01/70 00:00      
      it is a good idea, but the problem in another...            01/01/70 00:00      
      what an understatement            01/01/70 00:00      

Back to Subject List