i just want to know that they are same or not.
so is this code ok for this purpose or some suggestions.
#include "p16f84.inc" ; This includes PIC16F84 definitions for the MPASM assembler
; Please insert your code here.
J equ 21h
K equ 22h
main:
org 00h
banksel TRISB
movlw B'00000000'
movwf TRISB
banksel PORTB
clrf PORTB
movlw D'10'
movwf J
clrw
movlw D'10'
xorwf J , 0
movwf K
btfsc K , 0
goto a
btfsc K , 1
goto a
btfsc K , 2
goto a
btfsc K , 3
goto a
btfsc K , 4
goto a
btfsc K , 5
goto a
btfsc K , 6
goto a
btfsc K , 7
goto a
goto fin
a:
bsf PORTB , 0
fin:
goto fin
END
---------- Post added at 10:23 ---------- Previous post was at 10:11 ----------
modified programme of above code
#include "p16f84.inc" ; This includes PIC16F84 definitions for the MPASM assembler
; Please insert your code here.
J equ 21h
main:
org 00h
banksel TRISB
movlw B'00000000'
movwf TRISB
banksel PORTB
clrf PORTB
movlw D'10'
movwf J
clrw
movlw D'9'
xorwf J , 0
btfss STATUS , 2
a:
bsf PORTB , 0
fin:
goto fin
END
please which one is more secure above one or this one if i use it in a digital lock?