Rfid interfacing & controlling with 8051

20
VIT, CHENNAI MICROCONTROLLER ARCHITECTURE AND ORGANISATION SEMINAR TOPIC ‘Rfid Interfacing & Controlling With 8051’ COURSE FACULTY:BY: Prof. Muthhulakshmi Akshay Dhole (SMBS) 13MMT1013 Mechatronics (SMBS)

Transcript of Rfid interfacing & controlling with 8051

Page 1: Rfid interfacing & controlling with 8051

VIT, CHENNAI

MICROCONTROLLER ARCHITECTURE AND ORGANISATION

SEMINAR TOPIC

‘Rfid Interfacing & Controlling With 8051’

COURSE FACULTY: BY:Prof. Muthhulakshmi Akshay Dhole(SMBS) 13MMT1013 Mechatronics (SMBS)

Page 2: Rfid interfacing & controlling with 8051

IntroductionRFID-Radio frequency identification (RFID) is a

generic term that is used to describe a system that transmits the identity (in the form of a unique serial number) of an object or person wirelessly, using radio waves.

The information on the micro-chip can be read automatically, at a distance, by another wireless machine.

Page 3: Rfid interfacing & controlling with 8051

A basic RFID system consists of three components:An antenna or coil

A transceiver (with decoder)A transponder (RFID tag)

The radio frequency is read by the transceiver and the information is transferred to a device for further processing.

The information (the unique serial number) to be transmitted is stored in the RF tag or transponder.

Page 4: Rfid interfacing & controlling with 8051

COMPONENTS REQUIRED FOR INTERFACING RFID WITH 8051

RFID MODULE89C517MAX23216*2 LCD DISPLAY

Page 5: Rfid interfacing & controlling with 8051

RFID MODULE

Page 6: Rfid interfacing & controlling with 8051
Page 7: Rfid interfacing & controlling with 8051
Page 8: Rfid interfacing & controlling with 8051

LCD DISPLAY

Page 9: Rfid interfacing & controlling with 8051

CIRCUIT DAIGRAM

Page 10: Rfid interfacing & controlling with 8051

WORKING89c51 cannot be directly connected to a RFID module, a serial

converter is required. IC MAX232 has been used for this purpose.

Pins 1-3 of port P1 (P1.0, P1.1 & P1.2 respectively) of AT89C51 are connected to the control pins 4-6 LCD. The unique identification code of RFID tag is displayed on the LCD.

Receiver1 (R1) of MAX232 has been used for the serial communication. The receiver pin of RFID reader is connected to R1IN (pin13) of MAX232. R1OUT (pin 12) of MAX232 is connected to RxD (P3.0) of microcontroller.

Page 11: Rfid interfacing & controlling with 8051

MAX 232

1.The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during serial communication

2. The controller operates at TTL logic level (0-5V) whereas the serial communication in PC works on RS232 standards (-25 V to + 25V). It is a dual driver/receiver that includes a capacitive voltage generator to supply RS232 voltage levels from a single 5V supply.

Page 12: Rfid interfacing & controlling with 8051

3. Each receiver converts RS232 inputs to 5V TL/CMOS levels. These receivers (R1 & R2) can accept ±30V inputs. The drivers (T1 & T2) also called transmitters, convert the TTL/CMOS input level into RS232 level.

4.MAX232 needs four external capacitors whose value ranges from 1µF to 22µF.

Page 13: Rfid interfacing & controlling with 8051

PROGRAM CODE ;*****START OF THE PROGRAM***** ORG 0000H;***LCD COMMAND INSTRUCTIONS***MOV A,#038HACALL COMMANDMOV A,#0EHACALL COMMANDMOV A,#01HACALL COMMANDMOV A,#06HACALL COMMANDMOV A,#080HACALL COMMAND  

Page 14: Rfid interfacing & controlling with 8051

;***INITIALISATION OF SERIAL COMMMUNICATON***MOV TMOD ,#020HMOV TH0,#-3SETB TR1MOV SCON,#50H

;***CHECKING OF RI FLAG***HERE: JNB RI,HERE

MOV R5,#03HMOV SBUF,#'A'MOV A,SBUFMOV P1,ACLR RI

 ;***USER ID CHECK***CJNE A,#01H,USR1CJNE A,#02H,USR2CJNE A,#03H,USR3 

Page 15: Rfid interfacing & controlling with 8051

MOV DPTR, #MYDATAMOVC A,@A+DPTRACALL DATA1DJNZ R3,HERELJMP DOWN ;***IF USER 1 IS IDENTIFIED***USR1:MOV DPTR,#00H

UP1:MOV DPTR,#MYDATA1CLR AMOVC A,@A+DPTRACALL DATA1INC DPTRACALL SENDJZ DOWNSJMP UP1

Page 16: Rfid interfacing & controlling with 8051

;***IF USER 2 IS IDENTIFIED***USR2:MOV DPTR,#000H

UP2:MOV DPTR,#MYDATA2CLR AMOVC A,@A+DPTRACALL DATA1INC DPTRACALL SENDJZ DOWNSJMP UP2

;***IF USER 3 IS IDENTIFIED***USR3: MOV DPTR,#00H

UP3:MOV DPTR,#MYDATA3CLR AMOVC A,@A+DPTRACALL DATA1INC DPTRACALL SENDJZ DOWNSJMP UP3

Page 17: Rfid interfacing & controlling with 8051

;***SEND SUBROUTINE***SEND: MOV SBUF,AHERE1: JNB TI,HERE1CLR TIRET ;***LCD COMMAND SUBROUTINE***COMMAND:

MOV P2,ACLR P1.0CLR P1.1SETB P1.2ACALL DELAYCLR P1.2RET

 

 

Page 18: Rfid interfacing & controlling with 8051

;***LCD DATA SUBROUTINE***DATA1:

MOV P2,ACLR P1.0CLR P1.1SETB P1.2ACALL DELAYCLR P1.2RET

;***LCD DELAY SUBROUTINE***DELAY: MOV R3,#050

HERE3:MOV R4,#255HERE2: DJNZ R4,HERE2DJNZ R3,HERE3RET

Page 19: Rfid interfacing & controlling with 8051

MYDATA: DB "NO USER"MYDATA1: DB "USER1"MYDATA2: DB "USER2"MYDATA3: DB "USER3" DOWN:

END;***END OF PROGRAM*****

Page 20: Rfid interfacing & controlling with 8051

THANK YOU