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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/16/06 04:08
Read: times


 
#124390 - Column scan after ROW confirmation
Responding to: ???'s previous message

ERIK said:

; before the below statement acc will be having the
; value of PORT 1
anl a, #0f0h ; here columns are made low and only
; rows are scanned
cjne a, #0e0h, ROW_SCAN_2
sjmp ROW_1
You make all columns low, then you test for a row.

What this will tell you is that a key in row 1 and any column is pressed. I do not know what that information is good for.



By getting the values of ROW we the control will go ahead and will scan the particular column by the statement
                     SUB_FINAL:
                          rrc     a
                          jnc     MATCH
                          inc     dptr
                          sjmp    SUB_FINAL

                       MATCH:
                           clr     a
                           movc    a,@a+dptr
                           push    acc
                           ret
                     

As the Column is in lower nibble so after scanning the ROW, dptr will be having the particular ROW address and now by the above statement we can finsd the column and incement the dptr untill CARRY FLAG is clear. The incrementing value of DPTR is taken from the look up table which has the values according to the key is pressed.

You can calculate that by using this logic the key is pressed is scanned correctly. Juz I am unable to make it work.

thanks & regards
Arvind Shrivastava

List of 27 messages in thread
TopicAuthorDate
Matrix Keyboard not working            01/01/70 00:00      
   the logic            01/01/70 00:00      
   Lots of problems            01/01/70 00:00      
      no, it's completely bad in concept            01/01/70 00:00      
      Does the LCD Work?            01/01/70 00:00      
      enphasizing            01/01/70 00:00      
   commented code            01/01/70 00:00      
      Persistance my friend            01/01/70 00:00      
         I'll try it in other way            01/01/70 00:00      
            I'll make the corrections            01/01/70 00:00      
      Note on comments            01/01/70 00:00      
         bad, very bad - yes, but not necessarily because            01/01/70 00:00      
            Subroutine Details            01/01/70 00:00      
               I don't know            01/01/70 00:00      
                I do not know what that information is good for.            01/01/70 00:00      
                  Column scan after ROW confirmation            01/01/70 00:00      
                     Maybe the problem is not here            01/01/70 00:00      
      more Informative code            01/01/70 00:00      
         Comments are better            01/01/70 00:00      
         The Algorithm            01/01/70 00:00      
            This isn\'t necessarily true ...            01/01/70 00:00      
               a correct pain in the gluteus maximus            01/01/70 00:00      
                  Why so much pain?            01/01/70 00:00      
               An exercise for the student            01/01/70 00:00      
               everyone else            01/01/70 00:00      
   Does the LCD Work?            01/01/70 00:00      
      LCD is fine            01/01/70 00:00      

Back to Subject List