cloudkays
Newbie level 1
ASCII
Hi,
I'm currently interfacing RFID reader (using ID12 module) to 8051(AT89S52). After serially interface reader to pc (using 9600baud rate), I'm getting ASCII data from card1 (0D006AAC9259) and card2 (0D006A81DB3D). Now I would like to know how to program using assembly to represent the card so that each time card 1/ card 2 is tag, msg will appear in lcd. Here are some rough idea with no error but doesnt work as:
(im connecting RFID reader to P3.0(RxD) of 8051 for this purpose only)
CARD1: DB '0D 00 6A 81 DB 3D'
CARD2: DB '0D 06 6A AC 92 59'
ORG 100H
MOV TMOD,#20H
MOV TH1,#-3
MOV SCON,#50H
SETB SCON.4
SETB TR1
THIS:JNB RI,THIS
MOV A,SBUF
MOV P3,A
CJNE A,#CARD1,NEX
LJMP DISPLAY
NEX: CJNE A,#CARD2,THIS
LJMP DISPLAY
CLR RI
SJMP THIS
MOV A,#01
ACALL CMD
ACALL DELAY
MOV A,#06H
ACALL CMD
ACALL DELAY
MOV A,#81H
ACALL CMD
ACALL DELAY
DISPLAY: MOV A,#'O'
ACALL DAT
MOV A,#'K'
ACALL DAT
Hi,
I'm currently interfacing RFID reader (using ID12 module) to 8051(AT89S52). After serially interface reader to pc (using 9600baud rate), I'm getting ASCII data from card1 (0D006AAC9259) and card2 (0D006A81DB3D). Now I would like to know how to program using assembly to represent the card so that each time card 1/ card 2 is tag, msg will appear in lcd. Here are some rough idea with no error but doesnt work as:
(im connecting RFID reader to P3.0(RxD) of 8051 for this purpose only)
CARD1: DB '0D 00 6A 81 DB 3D'
CARD2: DB '0D 06 6A AC 92 59'
ORG 100H
MOV TMOD,#20H
MOV TH1,#-3
MOV SCON,#50H
SETB SCON.4
SETB TR1
THIS:JNB RI,THIS
MOV A,SBUF
MOV P3,A
CJNE A,#CARD1,NEX
LJMP DISPLAY
NEX: CJNE A,#CARD2,THIS
LJMP DISPLAY
CLR RI
SJMP THIS
MOV A,#01
ACALL CMD
ACALL DELAY
MOV A,#06H
ACALL CMD
ACALL DELAY
MOV A,#81H
ACALL CMD
ACALL DELAY
DISPLAY: MOV A,#'O'
ACALL DAT
MOV A,#'K'
ACALL DAT