Pretty self explanitory really?, the first line scans the keypad, and the next two check if any pressed key was found. If one was, then it jumps to Key_Found to process the key, otherwise it loops back round.
Keys call Scan_Keys
movlw 0x10 ;check for no key pressed
subwf key, w
btfss STATUS, Z
goto Key_Found
call Delay20
goto Keys
I understand that we are comparing the contents of 'key' with binary '00010000'.
Does this then mean that for 'no key pressed', in 'key' there should be 0x10 or 00010000
Keys call Scan_Keys
movlw 0x10 ;check for no key pressed
subwf key, w
btfss STATUS, Z
goto Key_Found
call Delay20
goto Keys
I understand that we are comparing the contents of 'key' with binary '00010000'.
Does this then mean that for 'no key pressed', in 'key' there should be 0x10 or 00010000
Would you explain what happens in terms of voltage levels when I press say key '1' and scan that row? In my case, which I suppose is similar to yours, the columns are tied to Vcc through resistors, and I scan the rows. Initially, the rows are all high