??? 05/13/07 09:01 Read: times |
#139167 - it is wotking now... Responding to: ???'s previous message |
i found a my mistake....
the new code is working properly... thnx.... #define keypad_mask 0x0F #define keypad_address (*((unsigned char xdata*)0x8007)) . . . const char code key_table[16] = "123A456B789C*0#D"; unsigned char key; unsigned char key_lcd; . . . void ex0_isr (void) interrupt 0 { unsigned char keypad_scan; key = ((keypad_scan=keypad_address)&keypad_mask); key_lcd = key_table[key]; goto_xy(19,0); putch_lcd(key_lcd); } . . . . . switch (key) { // goto_xy(1,1); case 0 : LCD_clear_row(1); goto_xy(0,1); Puts(buffer); goto_xy(17,0); putch_lcd('0'); break; case 1 : LCD_clear_row(1); goto_xy(0,1); rtc_time_to_lcd1(); goto_xy(17,0); putch_lcd('1'); break; case 2 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('2'); break; case 3 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('3'); break; case 4 : LCD_clear_row(1); goto_xy(17,0); rtc_read_reg(); rtc_reg_to_lcd(); goto_xy(17,0); putch_lcd('4'); break; case 5 : LCD_clear_row(1); goto_xy(0,1); rtc_reg_to_lcd1(); goto_xy(17,0); putch_lcd('5'); break; case 6 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('6'); break; case 7 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('7'); break; case 8 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('8'); break; case 9 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('9'); break; case 10 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('A'); break; case 11 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('B'); break; case 12 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('C'); break; case 13 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('D'); break; case 14 : LCD_clear_row(1); goto_xy(17,0); putch_lcd('E'); break; case 15 : LCD_clear_row(1); goto_xy(0,1); rtc_read_time(); rtc_time_to_lcd(); goto_xy(17,0); putch_lcd('F'); break; } . . . . |
Topic | Author | Date |
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 |