This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

having a problem

hi every one,
i m new in keil compiler. i connect LCD16x2 and keypad (4x4). my problem is that , in LCD, it can show from 0-15 on pressing from first till last key, while i want to print what is exactly written in keypad. like 1-9, 0, A to D.?
my second problem is that i can see the number only while pressing, i want that pressed no. to show untill i press new no.?
and third problem is that,i want to save the pressed digits from key pad , to send them wirelessly too, but thats a later task, first i need to save the digits in any variables.
many thinks and regards to all, plz waiting for the reply
my code is in c:\projects\hamash\keilcpp\55

Parents
  • No!

    Let's have a variable with a proper, meaningful name - like "previousKeyCode"

         var1 = INKEY();
    

    Again, why not have a variable with a proper, meaningful name - like "newKeyCode"

    Then the test becomes directly obvious - instead of having to look around for the meanings of var1 and OldVar1:

          if( newKeyCode != previousKeyCode )
    

Reply
  • No!

    Let's have a variable with a proper, meaningful name - like "previousKeyCode"

         var1 = INKEY();
    

    Again, why not have a variable with a proper, meaningful name - like "newKeyCode"

    Then the test becomes directly obvious - instead of having to look around for the meanings of var1 and OldVar1:

          if( newKeyCode != previousKeyCode )
    

Children
No data