View
219
Download
0
Category
Preview:
Citation preview
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 1/82
1
ABSTRACT
RFID (radio frequency identification)based attendance system is a
microcontroller based system for identifying persons, automatically
register the attendance and stores it in the EEPROM. The main
components of this system are an 89S52 microcontroller, an RFID reader
module and an EEPROM.
RFID reader module, also called as interrogators, convert radio waves
returned from the RFID tag into a form that can be passed on toControllers, which can make use of it. RFID tags and readers have to be
tuned to the same frequency in order to communicate. RFID systems usemany different frequencies, but the most common and widely used &supported by our Reader is 125 KHz.Each individual is given a tag, and the passive tags are excited when it isin magnetic proximity of the reader module and sends a code. The code isreceived, decoded and processed by the microcontroller and stored in theEEPROM
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 2/82
2
INDEX
CHAPTER CONTENTS PAGE
1. Introduction 1
2. Block Diagram
2.1 Block Diagram Description 2
3. Circuit
3.1 Circuit Description 4
3.2 Circuit Operation 8
4. Microcontroller Program 10
5. PCB
5.1 PCB Fabrication 13
5.2 PCB & Component Layout 15
5.3 Soldering 17
6. Estimate 19
7. Conclusion 20
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 3/82
3
References 21
Datasheets 22
CHAPTER 1
INTRODUCTION
Nowadays electronics and communication engineering is a fast growing field.
The fast growing technology is being implemented in almost all fields including
buisness, academics, medicine etc. Almost every aspects of our day to day life are
influenced by these changes in the electronics industry. The result is better reliability
and greater profit with low cost.
Here, in this project we introduce a fully automated, electronic version of our
daily attendance system. We use a radio frequency identification module for identifying
individuals. Each individual is provided with a RF tag (which consists of an antenna
and an embedded chip). The RF tag gets energized by the magnetic field provided by
the receiver module when it is in close proximity (within 15 cm) and sends the particular code stored within. The RF reader module receives the code, decodes it is
stored in the EEPROM connected along with the time and date provided by the DS
1307(real time clock).
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 4/82
4
CHAPTER 2
BLOCK DIAGRAM
2.1 BLOCK DIAGRAM DESCRIPTION
RF tagRF ID
reader
module
Microcontroller
Serial port
Keyboard
and
display
EEPROM
REAL TIME
CLOCK
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 5/82
5
Fig 2.1 Block Diagram
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 6/82
6
2.1 BLOCK DIAGRAM DESCRIPTION
Figure 2.1 shows the block diagram .Following is the description of each block in
detail.
RF ID tag consists of a small antenna and a chip (memory element) embedded within.
It is designed in such a way that it looks like an identification card; we can write
anything on it. The tag is energized when it is in the close proximity of the receiver
module and it sends the data to the receiver module serially. Here we use passive tags-
i.e., tags which do not need any power supply.
RF ID receiver consists of a chip programmed for the sole purpose. It includes a
magnetising coil for creating a field. The field have a range up to 15 cm. Here we use
the whole receiver unit can be considered as a 10 pin IC.
89S52 microcontroller is used here. Microcontroller is programmed to co-ordinate the
whole processes.
DS1307 is used as the real time clock. Real-time clock (RTC) counts seconds, minutes,hours, date of the month, month, day of the week, and year with leap-year compensation valid up to 2100. It is battery backed and has two wire serial interface.The RTC provides the date and time for registering the attendance.
AT24C08 is the EEPROM used. It is an Internally Organized 256 x 8 (2K), 512 x 8
(4K) or 1024 x 8 (8K) memory unit with 2-Wire Serial Interface. The name, date andtime is stored in the EEPROM. Data is written using the I2C protocol.
Keyboard and display unit consists of the keyboard and a 16*1 LCD screen for
display. Individual names can be entered using the keyboard and LCD displays all the
procedures.
Serial port provides path for communication with PC. The name, time and date are
displayed in the PC. PC can also be used to store the data in replacement of the
EEPROM.
CHAPTER 3
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 7/82
7
CIRCUIT
3.1 CIRCIUT DESCRIPTION
Figure 3.1 shows the circuit diagram of the RFID attendance system
Figure 3.0 shows the circuit diagram of the power supply circuit. This section
uses a voltage regulator LM 7805, 4 diodes and two capacitors. The voltage regulator
IC has three pins-input pin, output pin and ground pin. The diode D2 ensures that the
circuit does not get damaged even if the power source gets reversed. Two capacitors C3
and C4 are used at the input and output of the voltage regulator in order to avoid ripples
in the input and output voltage of the regulator.
Figure 3.1 shows the circuit diagram of the RFID attendance system .The circuits
consists of the 89S52 microcontroller, RFID reader module, a real time clock IC, an
EEPROM,LCD, keyboard and arrangements for serial communication. Each
component is explained as below.
The RFID receiver module communicates serially with the microcontroller through the
RXD pin (pin 10). Receiver module consists of an embedded circuit solely designed for
this purpose and a magnetising coil for energising the tags.
The LCD’s pins D0 to D7 are connected to the port 1(p1.0 to p1.7). The LCD is 16*1
type and has to be provided with separate supply for backlight. The RS, RW, E pins are
connected to p0.0, p0.1, p0.2 respectively.
We use DS1307 as the real time clock. The DS1307 Serial Real-Time Clock is a low- power; full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM.Address and data are transferred serially via a 2-wire, bi-directional bus. Theclock/calendar provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with AM/PM indicator. The DS1307 has a built-in power sensecircuit that detects power failures and automatically switches to the battery supply. It is
a 56-byte, battery-backed, non-volatile (NV) RAM for data storage with two-wire serialinterface. It has Programmable square wave output signal. It consumes less than 500nAin battery backup mode with oscillator running.
AT24C08 is the EEPROM used. The AT24C08 provides 8192 bits of serial electricallyerasable and programmable read only memory (EEPROM) organized as 1024 word of 8
bits each. The device is optimized for use in many industrial and commercialapplications where low power and low voltage operation are essential.It is an 8-pin IC and we write data by I2C protocol.MAX232 is used for serial communication. It is a +5V-Powered, Multichannel RS-232Drivers/Receivers and pin 10(t1 in) is connected to the TXD pin of the
microcontroller.
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 8/82
8
CIRCUIT DIAGRAM
Fig 3.0 Circuit diagram of the power supply unit
Fig 31 main Circuit diagram
230/0-12V
L1
AC
230V1N4007
D1
1N4007
D4
1000uF/25V
C1LM7805
1
2
3
IC1
C2
1N4007
D3
1N4007
D2
+5V
100uF/16
v
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 9/82
9
3.2 CIRCUIT OPERATION
The tag gets energized when it is in the magnetic proximity of the RFIDreceiver module. The receiver module reads the data in the individual cards and sends itserially to the pin 10(RXD). The microcontroller is programmed to process the data and
store the date and time for registering the address. The date and time is provided by theDS1307 real time clock. The DS1307 Serial Real-Time Clock is a low-power, full
binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM. Address anddata are transferred serially via a 2-wire, bi-directional bus. The clock/calendar providesseconds, minutes, hours, day, date, month, and year information. The end of the monthdate is automatically adjusted for months with fewer than 31 days, including correctionsfor leap year. The clock operates in either the 24-hour or 12 hour format with AM/PMindicator. The DS1307 has a built-in power sense circuit that detects power failures andautomatically switches to the battery supply.
The details of the authorised individuals will be stored in the microcontroller and when
the mc receives the data serially from the RFID reader, it checks the details; say itchecks the last 2 bytes of the 12byte address. Using the keyboard we can add or discardan user. Also we can enter the name of the individual using the 4*4 keyboard.AT24C08 is used as EEPROM with an internally organised 8K memory. It is
programmed using the I2C protocol through the 2-wire serial interface. The device isoptimized for use in many industrial and commercial applications where low power andlow voltage operation are essential. The name of the individual, date and time of logging in is stored in the EEPROM. The SDA and SCL pins are connected to the port0.6 and port 0.7 resp. the A0, A1, A2 pins are grounded.The LCD is connected to the port 1; i.e. D0 to D7 are connected to p1.0 to p1.7respectively. Other connections of the LCD are given accordingly. The LCD is
programmed so that it displays all the proceedings including displaying the name, date,time and data stored in the EEPROM.The PC interfacing is provided using serial data transfer and with the help of a VISUALBASIC program. The name of the individuals, date and time are displayed and alongwith that an attendance register is created.The serial data transfer is done through one of the COM ports of the PC using an
RS232 connector. To drive the RS232 we use a MAX232 IC which is a 16 pin IC.The connections are made as shown in the circuitdiagram.
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 10/82
10
CHAPTER 4
MICROCONTROLLER PROGRAM
;p1.0_7 connected to D0_7 of lcd
;p0.0 to RS
;p0.1 to RW
;p0.2 to E
;p0.3 to sda rtc
;p0.4 to scl rtc
;p0.5 to sda1 eeprom
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 11/82
11
;p0.6 to scl1 eeprom
;p3.0(rxd) to rfid
;p3.1(txd) to pc
;*******************************************************
;*******************************************************
SDA EQU P0.3
SCL EQU P0.4
SDA1 EQU P0.5
SCL1 EQU P0.6
RB0 EQU 00H
RB1 EQU 08H
RB2 EQU 10H
DS1307W EQU 0D0H
DS1307R EQU 0D1H
ROM_W EQU 0A0H
ROM_R EQU 0A1H
UP EQU P3.2
DOWN EQU P3.3
ENTER EQU P3.4
CANCEL EQU P3.5
DSEG ;internal data memory
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 12/82
12
ORG 20H ;bit addressable
FLAGS1: DS 1
RECEIVED BIT FLAGS1.0
AM BIT FLAGS1.1
MAS BIT FLAGS1.2
LASTREAD BIT FLAGS1.3
COUNTER: DS 1
BITCNT: DS 1
BYTECNT: DS 1
BYTE: DS 12
BYTES: DS 12 ;hold data read from eeprom
SECS: DS 1
MINS: DS 1
HRS: DS 1
DAY: DS 1
DATE1: DS 1
MONTH: DS 1
YEAR: DS 1
TOTAL: DS 1
TEMP: DS 1
TEMPS: DS 1
KB_DATA: DS 1
ROLLNOS: DS 2 ;hold card owner roll no
COUNTT: DS 1
STACK: DS 1
;*****MACROS******
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 13/82
13
SCL_HIGH MACRO
SETB SCL
JNB SCL, $
ENDM
CSEG ;program memory
; ---------==========----------==========---------=========---------
; Main routine. Program execution starts here.
; ---------==========----------==========---------=========---------
ORG 0H
AJMP MAIN
ORG 23H
JMP SERIAL
; ---------==========----------==========---------=========---------
MAIN:
MOV PSW, #RB0 ; Select register bank 0
MOV SP, #STACK
; **********************************************************
; INITILIZE RTC
; **********************************************************
SETB SDA ; ENSURE SDA HIGH
SCL_HIGH ; ENSURE SCL HIGH
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 14/82
14
CALL OSC_CONTROL ;Initilize the RTC
; **********************************************************
MOV TMOD, #20H
MOV TH1, #0FDH
MOV SCON, #50H
SETB ES
SETB EA
SETB TR1
MOV COUNTER, #01H
CLR RECEIVED
CALL INT_LCD
CALL TITLES
CALL DELAYS
CALL DELAYS
CALL READ_TOTAL
; **********************************************************
; CHECK FOR ENTER THE TIME
; **********************************************************
LCALL SEND_START ; SEND 2WIRE START CONDITION
MOV A, #DS1307W ; SEND DS1307 WRITE COMMAND
LCALL SEND_BYTE
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 15/82
15
MOV A, #08H ; SET POINTER TO REG 08H ON
DS1307
LCALL SEND_BYTE
LCALL SEND_STOP ; SEND STOP CONDITION
LCALL SEND_START ; SEND START CONDITION
MOV A, #DS1307R ; SEND DS1307 READ COMMAND
LCALL SEND_BYTE
LCALL READ_BYTE ; READ A BYTE OF DATA
MOV R1, A
LCALL SEND_STOP ; SEND 2WIRE STOP CONDITION
CJNE A, #0AAH, SET_RTC
AJMP TOP
;************************************************************
TOP: CALL RTCLOCK
MOV R0, #04H
RX3: MOV R1, #0FFH
RX1: MOV R2, #0FFH
RX2: JB RECEIVED,TOPS
DJNZ R2, RX2
DJNZ R1, RX1
DJNZ R0, RX3
AJMP TOP
;************************************************************
TOPS: MOV COUNTER, #01H
CLR ES
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 16/82
16
CLR RECEIVED
MOV R1, #BYTES ;CHECK FOR MASTER CARD
MOV R4,#03H ;MASTER ADDRESS
MOV R6, #12 ;NUMBER OF BYTES
CALL READ_EEPROM
CLR MAS
CALL COMPARE
JNB MAS, OTHER1
CALL DISPLAY ;"MASTER DETECTED
CALL DELAYS
CALL DELAYS
REP1: MOV TEMP, #01H
CALL DISPLAY1 ;"Press enter to add tag"
SETB UP
SETB DOWN
SETB ENTER
SETB CANCEL
UJI1: JNB CANCEL, VBN1
JNB UP, VBN2
JNB DOWN, VBN3
JNB ENTER, VBN4
AJMP UJI1
OTHER1: AJMP OTHER
VBN1: JNB CANCEL, $
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 17/82
17
SETB ES
CLR RECEIVED
AJMP TOP
VBN2: JNB UP, $
CALL DISPLAY1 ;"PRESS ENTER TO ADD TAG"
MOV TEMP, #01H
AJMP UJI1
VBN3: JNB DOWN, $
CALL DISPLAY2 ;"PRESS ENTER TO EDIT
TAG"
MOV TEMP, #02H
AJMP UJI1
;**************************************************************
GHO1: CJNE R5, #02H, GHO2 ;Delete Tag
JNB ENTER, $
JMP DELETE_PGM
GHO2: JNB ENTER, $
AJMP UJI1
REAP1: CALL DELAY
JNB CANCEL, $
AJMP REP1
;*************************************************************
VBN4: MOV R5, TEMP
CJNE R5, #01H, GHO1 ;Add tag
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 18/82
18
VBC1: CLR RECEIVED
CALL DISPLAY3 ;Show Tag
SETB ES
FVG1: JNB CANCEL, REAP1 ;stay in loop untill cancell or
receive tag
JNB RECEIVED,FVG1
CLR ES
LOOP1: CALL DISPLAY4 ;plz enter ROLL NO:
MOV TEMP, #00H
CALL CLEAR_RAM ;CLEARS ROLLNOS IN RAM
EDC: CLR C
CALL LOOP ;key is stored in KB_DATA, displays on
lcd
INC TEMP
MOV R2,TEMP
CJNE R2, #01H, EDC1
MOV R1, #ROLLNOS
MOV @R1, KB_DATA
EDC1: CJNE R2, #02H, EDC
MOV R1, #ROLLNOS+1
MOV @R1, KB_DATA
CALL DELAYS
CALL PRESS_ENTER
SETB ENTER
SETB CANCEL
HHJ: JNB CANCEL, LOOP1S
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 19/82
19
JB ENTER, HHJ
JNB ENTER, $
CALL READ_TOTAL
INC TOTAL
MOV R7, T0TAL
CALL GET_ADDRESS
MOV R1, #BYTE
MOV R4, R7
MOV R6, #12
CALL STORE_EEPROM
CALL MDELAY
MOV R1, #ROLLNOS
MOV A, R7
ADD A, #0CH
MOV R4, A
MOV R6, #2
CALL STORE_EEPROM
CALL MDELAY
CALL ID_SAVED
CALL WRITE_TOTAL
CALL DELAYS
JNB ENTER, $
AJMP REP1
LOOP1S: AJMP LOOP1
;*********************************************************************
LOOP:
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 20/82
20
ACALL GET_KEY
JNB ENTER, GHBH
JNB CANCEL, DCFV1
JNC LOOP
MOV R4, KB_DATA
CALL DATAWRT
RET
GHBH:
JNB ENTER, $
MOV TEMP, #2
RET
DCFV1:
JNB CANCEL, $
AJMP LOOP1
;********************************************************************
OTHER:
CALL READ_TOTAL
MOV R2, TOTAL
CALL CLEAR_RAM
MOV TEMP, #01H
JKP: MOV R7, TEMP
CALL GET_ADDRESS
MOV A, R7
CJNE A, #0FFH, CONT
SJMP ERR
CONT:MOV R1, #BYTES
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 21/82
21
MOV R4, R7
MOV R6, #12
CALL READ_EEPROM
CLR MAS
INC TEMP
CALL COMPARE
JNB MAS, JKP
MOV R1, #ROLLNOS
MOV A, R7
ADD A, #0CH
MOV R4, A
MOV R6, #2
CALL READ_EEPROM
CALL NAMES1
CALL DISP_ROLLNO
AJMP DON
ERR: CALL CARD_ERROR
SETB ES
CALL DELAYS
CALL DELAYS
AJMP TOP
DON: CALL TRANSMIT_DATA
SETB ES
CALL DELAYS
CALL DELAYS
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 22/82
22
AJMP TOP
NAMES1: JNB AM, ASX1
CALL NAME1
RET
ASX1: CALL NAME2
RET
;*******************************************************************
SEND_START:
SETB SDA ; BEGIN START CODITION
SCL_HIGH
CLR SDA
NOP
NOP
CLR SCL
RET
;****************************************************************
SEND_BYTE:
MOV BITCNT, #08H
SB_LOOP: RLC A
MOV SDA, C
SCL_HIGH
NOP
NOP
CLR SCL
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 23/82
23
DJNZ BITCNT, SB_LOOP
SETB SDA
SCL_HIGH
NOP
NOP
CLR SCL
NOP
NOP
RET
; *************************************************************
; **********************************************************
SEND_STOP:
CLR SDA
SCL_HIGH
SETB SDA
RET
;**********************************************************
;**********************************************************
READ_BYTE:
MOV BITCNT, #08H
MOV A, #00H
SETB SDA
READ_BITS:
SCL_HIGH
MOV C, SDA
RLC A
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 24/82
24
CLR SCL
DJNZ BITCNT, READ_BITS
JB LASTREAD, ACKN
CLR SDA
ACKN:
SCL_HIGH
CLR SCL
RET
;***********************************************************
SERIAL:
PUSH PSW ; save current registerset
MOV PSW,#RB1
PUSH ACC
JB TI,TRANS
MOV A,SBUF
CJNE A,#0AH,DOWNW
MOV COUNTER,#01H
AJMP DDWN
DOWNW:CJNE A,#0DH,DOWN2
MOV COUNTER,#01H
AJMP DDWN
DOWN2:
MOV R1,COUNTER
CJNE R1,#01H,YH1
MOV BYTE,A
AJMP DOWN1
YH1: CJNE R1,#02H,YH2
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 25/82
25
MOV BYTE+1,A
AJMP DOWN1
YH2: CJNE R1,#03H,YH3
MOV BYTE+2,A
AJMP DOWN1
YH3: CJNE R1,#04H,YH4
MOV BYTE+3,A
AJMP DOWN1
YH4: CJNE R1,#05H,YH5
MOV BYTE+4,A
AJMP DOWN1
YH5: CJNE R1,#06H,YH6
MOV BYTE+5,A
AJMP DOWN1
YH6: CJNE R1,#07H,YH7
MOV BYTE+6,A
AJMP DOWN1
YH7: CJNE R1,#08H,YH8
MOV BYTE+7,A
AJMP DOWN1
YH8: CJNE R1,#09H,YH9
MOV BYTE+8,A
AJMP DOWN1
YH9: CJNE R1,#0AH,DOWN1
MOV BYTE+9,A
SETB RECEIVED
AJMP DOWN1
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 26/82
26
DOWN1:INC COUNTER
DDWN: CLR RI
POP ACC
POP PSW
RETI
TRANS: CLR TI
POP ACC
POP PSW
RETI
;***********************************************************
;**********************************************************
OSC_CONTROL:
ACALL SEND_START ; GENERATE START CONDITION
MOV A,#DS1307W ; 1101 0000 ADDRESS + WRITE-BIT
ACALL SEND_BYTE ; SEND BYTE TO 1307
MOV A,#00H ; ADDRESS BYTE TO REGISTER 00H
ACALL SEND_BYTE ; SECONDS REGISTER, ALWAYS LEAVE
SETB LASTREAD ; REG 00H-BIT #7 = 0 (LOW)
ACALL SEND_STOP ; IF REG 00H-BIT #7 = 1 CLOCK
ACALL SEND_START ; OSCILLATOR IS OFF.
MOV A,#DS1307R ; 1101 0001 ADDRESS + READ-BIT
ACALL SEND_BYTE ;
ACALL READ_BYTE ; READ A BYTE FROM THE 1307
CLR ACC.7 ; CLEAR REG 00H-BIT #7 TO ENABLE
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 27/82
27
OSC_SET: ; OSCILLATOR.
PUSH ACC ; SAVE ON STACK
ACALL SEND_STOP ;
ACALL SEND_START ;
MOV A,#DS1307W ; SETUP TO WRITE
ACALL SEND_BYTE ;
MOV A,#00H ; REGISTER 00H ADDRESS
ACALL SEND_BYTE ;
POP ACC ; GET DATA TO START OSCILLATOR
ACALL SEND_BYTE ; SEND IT
ACALL SEND_STOP
RET
;********************************************************************
;lcd subroutines
;********************************************************************
INT_LCD: ;initialise lcd
MOV A, #38H;5*7 matrix
ACALL CMDWRT
MOV A, #0EH ;disp on, cursor blinks
ACALL CMDWRT
MOV A, #01H;clr disp
ACALL CMDWRT
MOV A, #084H ;first row, 4th position
ACALL CMDWRT
RET
CMDWRT: ;write command, command in R4
PUSH ACC
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 28/82
28
ACALL READY
MOV A, R4
MOV P1, A
CLR P2.0
CLR P2.1
SETB P2.2 ;set e high
CLR P2.2 ;h-l pulse
POP ACC
RET
DATAWRT:
PUSH ACC ;write data, data in R4
ACALL READY
MOV A, R4
MOV P1, A
SETB P2.0
CLR P2.1
SETB P2.2
CLR P2.2 ;h-l pulse
POP ACC
RET
READY: ;to check disp ready
SETB P1.7
CLR P2.0
SETB P2.1
BACK:
CLR P2.2
SETB P2.2
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 29/82
29
JB P1.7, BACK
RET
BCDWRT:
PUSH ACC ;write packed bcd, bcd data in R3
ACALL READY
MOV A, R3
ANL A, #0F0H
SWAP A
ADD A, #30H
MOV R4, A
CALL DATAWRT
MOV A, R3
ANL A, #0FH
ADD A, #30H
MOV R4, A
CALL DATAWRT
POP ACC
RET
;
**********************************************************************
**
TITLES:
MOV DPTR,#MSAG
CALL LCD_MSG
RET
MSAG:
DB 1H,81H,'RFID Based',0C0H,'Attendance Sys',00H
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 30/82
30
;*************************************************************
DELAYS: ;One second delay routine
MOV R0,#05H
RS3: MOV R1,#0FFH
RA1: MOV R2,#0FFH
RS2: NOP
DJNZ R2,RS2
DJNZ R1,RA1
DJNZ R0,RS3
RET
;**************************************************************
READ_TOTAL:
MOV A,#WTCMD ;LOAD WRITE COMMAND TO
SEND ADDRESS
CALL OUTS ;SEND IT
MOV A,#02H ;GET LOW BYTE ADDRESS
CALL OUT ;SEND IT
CALL CREAD ;GET DATA BYTE
MOV TOTAL,R1
CALL MDELAY
RET
;
**********************************************************************
******
SET_RTC:
MOV TEMP, #00H
LAOP: INC TEMP
MOV R1, TEMP
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 31/82
31
CJNE R1,#01H,IOP1
CALL DATE_DISP ;enter date
CALL GET_KEY ;key in kb_data(ascii), displayed on lcd
MOV A, KB_DATA
CLR C
SUBB A, #30H
SWAP A
MOV DATE1, A
CALL GET_KEY
MOV A, KB_DATA
CLR C
SUBB A, #30H
ORL A, DATE1
MOV DATE1, A
CALL DELAY
AJMP LAOP
IOP1: CJNE R1, #02H, IOP2 ;GET MONTH
CALL MON_DISP
CALL GET_KEY
MOV A, KB_DATA
CLR C
SUBB A, #30H
SWAP A
MOV MONTH, A
CALL GET_KEY
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 32/82
32
MOV A, KB_DATA
CLR C
SUBB A, #30H
ORL A, MONTH
MOV MONTH, A
CALL DELAY
AJMP LAOP
IOP2: CJNE R1, #03H, IOP3 ;GET YEAR
CALL YR_DISP
CALL GET_KEY
MOV A, KB_DATA
CLR C
SUBB A, #30H
SWAP A
MOV YEAR, A
CALL GET_KEY
MOV A, KB_DATA
CLR C
SUBB A, #30H
ORL A, YEAR
MOV YEAR, A
CALL DELAY
AJMP LAOP
IOP3: CJNE R1, #04H, IOP4 ;GET DAY
CALL DAY_DISP
CALL GET_KEY
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 33/82
33
MOV A, KB_DATA
CLR C
SUBB A, #30H
MOV DAY, A
CALL DELAY
AJMP LAOP
IOP4: CJNE R1, #05H, IOP5 ;GET HOUR
CALL HR_DISP
CALL GET_KEY
MOV A, KB_DATA
CLR C
SUBB A, #30H
SWAP A
MOV HRS, A
CALL GET_KEY
MOV A, KB_DATA
CLR C
SUBB A, #30H
ORL A, HRS
MOV HRS, A
CALL DELAY
AJMP LAOP
IOP5: CJNE R1, #06H, IOP6 ;GET MIN
CALL MIN_DISP
CALL GET_KEY
MOV A, KB_DATA
CLR C
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 34/82
34
SUBB A, #30H
SWAP A
MOV MINS, A
MOV R4, KB_DATA
CALL WRLCDDATA
CALL GET_KEY
MOV A, KB_DATA
CLR C
SUBB A, #30H
ORL A, MINS
MOV MINS, A
CALL DELAY
AJMP LAOP
IOP6: CJNE R1, #07H, STORE_RTC ;GET AM/PM
CALL AMS_DISP
CALL GET_KEY
MOV A, KB_DATA
CLR C
SUBB A, #30H
CJNE A, #00H, GBBN1
SETB AMS
CALL AM_DISP
AJMP GBBN2
GBBN1: CLR AMS
CALL PM_DISP
GBBN2: CALL DELAY
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 35/82
35
AJMP LAOP
;
**********************************************************************
**********
STORE_RTC:
LCALL SEND_START ; SEND 2WIRE START CONDITION
MOV A, #DS1307W ; LOAD DS1307 WRITE COMMAND
LCALL SEND_BYTE ; SEND WRITE COMMAND
MOV A, #08H ; SET DS1307 DATA POINTER TO
BEGINNING
LCALL SEND_BYTE ; OF USER RAM 08H
MOV A, #0AAH ; WRITE BYTE TO ENTIRE RAM
SPACE
LCALL SEND_BYTE
LCALL SEND_STOP ; SEND 2WIRE STOP CONTION
LCALL SEND_START ; SEND 2WIRE START CONDITION
MOV A, #DS1307W ; LOAD DS1307 WRITE COMMAND
LCALL SEND_BYTE ; SEND WRITE COMMAND
MOV A, #01H ; SET DS1307 DATA POINTER TO
BEGINNING
LCALL SEND_BYTE ; OF 00H
MOV A, MINS ; Send min
LCALL SEND_BYTE
MOV A, HRS ;send hr
SETB ACC.6 ;12 HR MODE
JNB AMS, YUH
CLR ACC.5 ;AM/PM 1=PM,0=AM
AJMP YUH1
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 36/82
36
YUH: SETB ACC.5
YUH1:LCALL SEND_BYTE
MOV A, DAY ; Send Day
LCALL SEND_BYTE
MOV A, DATE1 ; Send date
LCALL SEND_BYTE
MOV A, MONTH ; Send month
LCALL SEND_BYTE
MOV A, YEAR ; Send yr
LCALL SEND_BYTE
LCALL SEND_STOP ; SEND 2WIRE STOP CONTION
RET
;
**********************************************************************
*******
GET_KEY:
MOV P2, #0FFH
K1: MOV P1, #0
MOV A, P2
ANL A, #0FH
CJNE A, #0FH, K1
K2: ACALL DELAY_KB
MOV A, P2
ANL A, #0FH
CJNE A, #0FH, OVER
SJMP K2
OVER:ACALL DELAY_KB
MOV A, p2
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 37/82
37
ANL A, #0FH
CJNE A, #0FH, OVER1
SJMP K2
OVER1: MOV P1, #0FEH
MOV A, P2
ANL A, #0FH
CJNE A, #0FH, ROW_0
MOV P1, #0FDH
MOV A, P2
ANL A, #0FH
CJNE A, #0FH, ROW_1
MOV P1, #0FBH
MOV A, P2
ANL A, #0FH
CJNE A, #0FH, ROW_2
MOV P1, #0F7H
MOV A, P2
ANL A, #0FH
CJNE A, #0FH, ROW_3
LJMP K2
ROW_0: MOV DPTR, #KCODE0
SJMP FIND
ROW_1: MOV DPTR, #KCODE1
SJMP FIND
ROW_2: MOV DPTR, #KCODE2
SJMP FIND
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 38/82
38
ROW_3: MOV DPTR, #KCODE3
FIND: RRC A
JNC MATCH
INC DPTR
SJMP FIND
MATCH: CLR A
MOVC A, @A+DPTR
MOV KB_DATA, A
SETB C
RET
DELAY_KB:
PUSH R1
MOV R1, #6
AGAIN: CALL MDELAY
DJNZ R1, AGAIN
POP R1
RET
;look-up table
KCODE0: DB '0', '1', '2', '3'
KCODE1: DB '4', '5', '6', '7'
KCODE2: DB '8', '9', 'A', 'B'
KCODE3: DB 'C', 'D', 'E', 'F'
;*************************************************************
RTCLOCK:
PUSH ACC
CALL READ_CLOCK
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 39/82
39
MOV A, #01H
CALL CMDWRT
MOV A, #81H
CALL CMDWRT
MOV R3, DATE1
CALL BCDWRT
MOV A, #'-'
CALL DATAWRT
MOV R3, MONTH
CALL BCDWRT
MOV A, #'-'
CALL DATAWRT
MOV A, #'2'
CALL DATAWRT
MOV A, #'0'
CALL DATAWRT
MOV R3, YEAR
CALL BCDWRT
MOV A,DAY
CJNE A,#01H,TGY1
CALL SUN
JMP TGY
TGY1: CJNE A,#02H,TGY2
CALL MON
JMP TGY
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 40/82
40
TGY2: CJNE A,#03H,TGY3
CALL TUE
JMP TGY
TGY3: CJNE A,#04H,TGY4
CALL WED
JMP TGY
TGY4: CJNE A,#05H,TGY5
CALL THU
JMP TGY
TGY5: CJNE A,#06H,TGY6
CALL FRI
JMP TGY
TGY6: CJNE A,#07H,TGY
CALL SAT
JMP TGY
TGY: MOV A, #0C3H
CALL CMDWRT
MOV A, HRS
JNB ACC.5, DCF3
CLR AM
AJMP DCF2
DCF3: SETB AM
DCF2: ANL A, #00011111B
MOV R3, A
CALL BCDWRT
MOV A, #':'
CALL DATAWRT
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 41/82
41
MOV R3, MINS
CALL BCDWRT
MOV A, #':'
CALL DATAWRT
MOV R3, SECS
CALL BCDWRT
MOV A, #' '
CALL DATAWRT
JNB AM, DCF0
MOV A, #'A'
CALL DATAWRT
JMP DCF4
DCF0: MOV A, #'P'
CALL DATAWRT
DCF4: MOV A, #'M'
CALL DATAWRT
NOP
POP ACC
RET
;
**********************************************************************
**
READ_EEPROM:
MOV A,#ROM_W ;LOAD WRITE COMMAND TO SEND
ADDRESS
CALL OUTS ;SEND IT
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 42/82
42
MOV A,R4 ;GET LOW BYTE ADDRESS
CALL OUT ;SEND IT
MOV A, #ROM_R ;LOAD READ COMMAND
CALL OUTS ;SEND IT
BRDLP: CALL IN ;READ DATA
MOV @R1,a ;STORE DATA
INC R1 ;INCREMENT DATA POINTER
DJNZ R6,AKLP ;DECREMENT LOOP COUNTER
CALL STOP ;IF DONE, ISSUE STOP CONDITION
RET ;DONE, EXIT ROUTINE
AKLP: CLR SDA1 ;NOT DONE, ISSUE ACK
SETB SCL1
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR SCL1
JMP BRDLP ;CONTINUE WITH READS
;**********************************************************************
***
STORE_EEPROM:
MOV A, #ROM_W ;LOAD WRITE COMMAND
CALL OUTS ;SEND IT
MOV A, R4 ;GET LOW BYTE ADDRESS
CALL OUT ;SEND IT
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 43/82
43
BTLP: MOV A, @R1 ;GET DATA
CALL OUT ;SEND IT
INC R1 ;INCREMENT DATA POINTER
DJNZ R6, BTLP ;LOOP TILL DONE
CALL STOP ;SEND STOP CONDITION
RET
;
**********************************************************************
***
OUTS: CALL START
CALL DATA_WRITE
CALL ACK
RET
;
**********************************************************************
***
OUT: CALL DATA_WRITE
CALL ACK
RET
;
**********************************************************************
***
STOP: CLR SDA1
NOP
SETB SCL1
NOP
NOP
SETB SDA1
NOP
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 44/82
44
NOP
CLR SCL1
NOP
SETB SDA1
RET
;
**********************************************************************
**
START: SETB SDA1
NOP
SETB SCL1
NOP
NOP
CLR SDA1
NOP
NOP
CLR SCL1
NOP
RET
;
**********************************************************************
**
DATA_WRITE:
CLR C
MOV R2, #08H
HERE7:
RLC A
MOV SDA1, C
SETB SCL1
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 45/82
45
JNB SCL1, $
NOP
NOP
CLR SCL1
JB SCL1, $
NOP
NOP
DJNZ R2, HERE7
RET
;
**********************************************************************
*
IN: CLR A
CLR C
SETB SDA1
MOV R2, #08H
HERE8:
SETB SCL1
JNB SCL1, $
NOP
MOV C, SDA1
CLR SCL
RLC A
DJNZ R2, HERE8
RET
;
**********************************************************************
*
COMPARE:
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 46/82
46
MOV A, BYTES
CJNE A, BYTE, FGG
MOV A, BYTES+1
CJNE A, BYTE+1, FGG
MOV A, BYTES+2
CJNE A, BYTE+2, FGG
MOV A, BYTES+3
CJNE A, BYTE+3, FGG
MOV A, BYTES+4
CJNE A, BYTE+4, FGG
MOV A, BYTES+5
CJNE A, BYTE+5, FGG
MOV A, BYTES+6
CJNE A, BYTE+6, FGG
MOV A, BYTES+7
CJNE A, BYTE+7, FGG
MOV A, BYTES+8
CJNE A, BYTE+8, FGG
MOV A, BYTES+9
CJNE A, BYTE+9, FGG
MOV A, BYTES+10
CJNE A, BYTE+10, FGG
MOV A, BYTES+11
CJNE A, BYTE+11, FGG
SETB MAS
FGG: RET
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 47/82
47
;
**********************************************************************
*
DISPLAY:
MOV DPTR,#MSAG2
CALL LCD_MSG
RET
MSAG2:
DB 1H,80H,'Master Card',0C0H,'Detected...',00H
;**********************************************************************
DISPLAY1:
MOV DPTR, #MSAG3
CALL LCD_MSG
RET
MSAG3:
DB 1H,80H,'Press Enter...',0C0H,'*** ADD TAG ***',00H
;**********************************************************************
DISPLAY2:
MOV DPTR,#MSAG4
CALL LCD_MSG
RET
MSAG4:
DB 1H,80H,'Press Enter...',0C1H,'** EDIT TAG **',00H
;**********************************************************************
DISPLAY3:
MOV DPTR,#MSAG5
CALL LCD_MSG
RET
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 48/82
48
MSAG5:
DB 1H,80H,'Please show the',0C3H,'** TAG **',00H
;**********************************************************************
DISPLAY4:
MOV DPTR,#MSAG6
CALL LCD_MSG
RET
MSAG6:
DB 1H,0FH,80H,'Plz enter Name',0C0H,00H
;**********************************************************************
PRESS_ENTER:
MOV DPTR,#MSG11
CALL LCD_MSG
RET
MSG11:
DB 1H,82H,'Press Enter',0C4H,'to Save',00H
;*********************************************************************
ID_SAVED:
MOV DPTR,#MSG12
CALL LCD_MSG
RET
MSG12:
DB 1H,83H,'TAG Saved',0C2H,'Sucessfully',00H
;*********************************************************************
CARD_ERROR:
MOV DPTR,#MSG14
CALL LCD_MSG
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 49/82
49
RET
MSG14:
DB 1H,84H,'Card Not',0C3H,'Programmed',00H
;*********************************************************************
DELETE_PGM:
CALL READ_TOTAL
MOV TEMPS, TOTAL
SETB UP
SETB DOWN
SETB ENTER
SETB CANCEL
MOV R5, TEMPS
CJNE, R5, #00H, EDT0
CALL NO_CARD
CALL DELAYS
JMP REP1
EDT0:
MOV R7, TEMPS
CALL GET_ADDRESS
MOV A, R7
ADD A, #12
MOV R1, #ROLLNOS
MOV R4, A
MOV R6, #2
AJMP EDIT
EDIT: CALL READ_EEPROM
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 50/82
50
CALL DISPLAY5
CALL DISPLAY_ROLLNO
EDIT7:JNB UP, GBN2
JNB CANCEL, VFR3
JNB DOWN, GBN1
JNB ENTER, EDIT_NAME
AJMP EDIT7
VFR3: CALL DELAY
JNB CANCEL, $
JMP REP1
GBN2:JNB UP, $
MOV A, TEMPS
CJNE A, #01H, VFR2
MOV TEMPS, TOTAL
JMP EDT0
VFR2: DEC TEMPS
JMP EDT0
VFR1: INC TEMPS
JMP EDT0
GBN1: JNB DOWN, $
MOV A, TEMPS
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 51/82
51
XRL A, TOTAL
JNZ VFR1
MOV TEMPS, #01H
JMP EDT0
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EDIT_NAME:
JNB ENTER, $
AJMP EDIT_NAM
EDIT_NAM: NOP
LAOP1: CALL DISPLAY4 ;plz enter roll no
MOV TEMP, #00H
CALL CLEAR_RAM
EADC:CALL LOOPZ
INC TEMP
MOV R2, TEMP
CJNE R2, #01H, EADC1
MOV R1, #ROLLNOS
MOV @R1, KB_DATA
EADC1: CJNE R2, #02H, EADC
MOV R1, #ROLLNOS+1
MOV @R1, KB_DATA
CALL DELAYS
CALL PRESS_ENTER
SETB ENTER
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 52/82
52
SETB CANCEL
HHJS: JNB CANCEL, LAOP1
JB ENTER, HHJS
MOV A, TEMPS
MOV R7, A
CALL GET_ADDRESS
MOV A, R7
ADD A, #12
MOV R1, #ROLLNOS
MOV R4, A
MOV R6, #2
CALL STORE_EEPROM
CALL ID_SAVED
CALL DELAYS
JNB ENTER, $
JMP DELETE_PGM
LOOPZ: CALL GET_KEY
JNB ENTER, GAHBH
JNB CANCEL, DCFAV1
JNC LOOPZ
MOV R4, KB_DATA
CALL WRTDATA
RET
GAHBH: JNB ENTER, $
MOV TEMP, #02
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 53/82
53
RET
DCFAV1: JNB CANCEL, $
POP ACC
JMP DELETE_PGM
;
**********************************************************************
*****
CLEAR_RAM:
MOV ROLLNOS, #0FFH
MOV ROLLNOS+1, #0FFH
RET
;
**********************************************************************
*****
GET_ADDRESS:
PUSH ACC
MOV A, R7
MOV B, #10
MUL AB
MOV R7, A
POP ACC
RET
;
**********************************************************************
****
MDELAY:
PUSH ACC
MOV A,#0A6H
MD_OLP:
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 54/82
54
INC A
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
JNZ MD_OLP
NOP
POP ACC
RET
MADELAY:
PUSH ACC
MOV A,#036H
MAD_OLP:
INC A
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
JNZ MAD_OLP
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 55/82
55
NOP
POP ACC
RET
;
**********************************************************************
****
WRITE_TOTAL:
MOV A,#WTCMD ;LOAD WRITE COMMAND
CALL OUTS ;SEND IT
MOV A,#05H ;GET BYTE ADDRESS
CALL OUT ;SEND IT
MOV A,TOTAL ;GET DATA
CALL OUT ;SEND IT
CALL STOP ;SEND STOP CONDITION
CALL MDELAY
RET
;
**********************************************************************
****
DISP_ROLLNO:
MOV R4, ROLLNOS
CJNE R4, #0FFH, FV1
RET
FV1: CALL DATAWRT
CALL MDELAY
MOV R4, ROLLNOS+1
CJNE R4, #0FFH, FV2
RET
FV2: CALL DATAWRT
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 56/82
56
CALL MDELAY
RET
;
*************************************************************************
TRANSMIT_DATA:
MOV SBUF,#'@'
CALL MDELAY
MOV R3,DATE1
CALL SPLIT_DATAS
MOV R3,MONTH
CALL SPLIT_DATAS
MOV R3,YEAR
CALL SPLIT_DATAS
MOV R3,DAY
CALL SPLIT_DATAS
MOV A,HRS
ANL A,#00011111B
MOV R3,A
CALL SPLIT_DATAS
MOV R3,MINS
CALL SPLIT_DATAS
MOV R3,SECS
CALL SPLIT_DATAS
JNB AM,DFV2
MOV SBUF,#'A'
AJMP DFV1
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 57/82
57
DFV2: MOV SBUF,#'P'
DEV1: CALL MDELAY
MOV SBUF, #'#'
CALL MDELAY
MOV R3, ROLLNOS
CALL MDELAYX
MOV R3, ROLLNOS+1
CALL MDELAYX
MOV R3,#0CCH
CALL MDELAYX
MOV SBUF,#'$'
CALL MDELAY
RET
SPLIT_DATAS:
MOV A,R3
ANL A,#0F0H
SWAP A
ADD A,#30H
MOV SBUF,A
CALL MDELAY
MOV A,R3
ANL A,#0FH
ADD A,#30H
MOV SBUF,A
CALL MDELAY
RET
MDELAYX:
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 58/82
58
CJNE R3,#0FFH,WSE
RET
WSE: MOV SBUF,R3
CALL MDELAY
RET
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 59/82
59
CHAPTER 5
PCB
5.1 PCB FABRICATION
PCB Preparation
You need to generate a positive (copper black) UV translucent artwork film.
You will never get a good board without good artwork, so it is important thing to get a
clear sharp image with a very solid opaque black. Artwork is drawn using PCB Wizard
software. While designing immense care must be taken to minimize jumpers. It is
absolutely essential that your PCB software prints holes in the middle of pads, which
will act as center marks when drilling. It is virtually impossible to accurately hand-drill
boards without these holes. The artwork must be printed such that the printed side is in
contact with the PCB surface when exposing, to avoid blurred edges. In practice, this
means that if you design the board as seen from the component side, the bottom (solder
side) layer should be printed mirrored.
Etching
Ferric Chloride etchant is a messy stuff, but easily available and cheaper than
most alternatives. It attacks any metal including stainless steel. So when setting up a
PCB etching area, use a plastic or ceramic sink, with plastic fittings and screws
wherever possible, and seal any metal screws with silicon. Use hex hydrate type of
ferric chloride, which should be dissolved in warm water until saturation. Adding a
teaspoon of table salt helps to make the etchant clearer for easier inspection. Always
take extreme care to avoid splashing when dissolving ferric chloride, as it trends toclump together and you often get big chunks coming out of the container and splashing
into the solution. It can damage your eyes and permanently stain clothing.
Drilling
For Fibreglass (FR4) board, you must use tungsten carbide drill bits. Carbide
drill bits are expensive and the thin ones snap very easily. When using carbide drill bits
below 1mm, you must use a good vertical drill stand to avoid frequent breaking.
Carbide drill bits are available as straight- shank or thick (sometimes called turbo)
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 60/82
60
shank. In straight-Shank, the whole bits is the diameter of the hole, and in thick shank, a
standard- size shank tapers down to hole size. The straight-shank drills are usually
preferred because they break less easily and are usually cheaper. The longer thin section
provides more flexibility.
Small drills for PCB use usually come with either set of collets of various size
or a 3-jaw chunk. For accuracy however, 3-jaw chunks are not brilliant, and small drill
sizes below 1mm quickly form grooves in the jaws, preventing good grip. You need a
good strong light on the board when drilling, to ensure accuracy.
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 61/82
61
5.2 PCB & COMPONENT LAYOUT
Fig 5.2 (a) PCB layout of the circuit.
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 62/82
62
Fig 5.2 (b) Component layout of the transmitter circuit
POWER SUPPLY
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 63/82
63
Fig 5.2 (c) PCB layout of the power supply
Fig 5.2 (d) Component layout of power supply
5.3 SOLDERING
Soldering is the joining together of two metals to give physical bonding and
good electrical conductivity. It is used primarily in electrical and electronic circuitry.
Solder is a combination of metals, which are solid at normal room temperature and
becomes liquid at between 180o C and 200oC. Solder bonds well to various metals, and
extremely well to copper. Soldering is the primary way how electronics components are
connected to circuit boards, wires and sometimes directly to other components.
To solder you need a soldering iron. A modem basic electrical soldering iron
consists of a heating element, a soldering bit (often called tip), a handle and a power
cord. The heating element can either be a resistance wire wound around a ceramic tube
or a thick film resistance element printed on to a ceramic base. The element is then
insulated and placed into a metal tube for strength and protection. This is then thermally
insulated from the handle. The heating element of the soldering iron usually reaches the
temperatures around 370 to 400 °C (higher than required to melt the solder). The
soldering bit is a specially shaped piece of copper plated with iron and then with
chrome or iron. The tip planting makes it very resistant to aggressive solders and fluxes.
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 64/82
64
The strength of a soldering iron is usually expressed in Watts. Irons used in
electronics are usually of the range 12 to 25 Watts. For advanced soldering work you
will need soldering iron with temperature control.
You need to be careful in soldering because most of the electronic components
are fragile and heat sensitive. Usually the biggest concern is heat. Low enough
soldering temperature and short enough soldering time will keep the components in
good shape. Prolonged exposure to heat may heat up the inside of the component and
damage it permanently.
Currently the best commonly available solder alloy is eutectic solder (63% lead
and 37% tin). It has the character of being in both solid and liquid state at the same
temperature. Flux is vital in good solder. It is an aggressive chemical that removes
oxides and impurities from the parts to be soldered.
Always wash your hand prior to eating , drinking or going to bathroom after
soldering. When you solder tiny balls of soldering tin will get on your hands and they
need to be washed off before it gets to your body. Also do not keep food near soldering
works since there is a chance of small bubbles of soldering tin flying from the tip of the
soldering iron.
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 65/82
65
CHAPTER 6
ESTIMATE
COMPONENT QUANTITY PRICEMICROCONTROLLER 1 50.00
DS1307 1 25.00
AT245C08 1 10.00
16*2 LCD MODULE 1 108.00
MAX232 1 13.00
4*3 KEYPAD 1 100.00
RS232 CONNECTOR 1 5.00
RFID RECIVER MODULE 1 1200.00CRYSTAL OSCILLATOR
RFID TAGSPOTENTIMETER 3V BUTTON CELL
SWITCHES
3
511
4
30.00
100.005.0010.00
20.00
VOLTAGE REGULATOR 2 24.00
DIODES 3 6.00
RESISTORS 16 3.00
CAPACITORS 12 30.00PCB PREPARATION 2 250.00
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 66/82
66
LED 4 4.00
MISCELLANEOUS 23.00
TOTAL 2016.00
CHAPTER 7
CONCLUSION
The presented project is a microcontroller based attendance system using RFID
module. The system can be used to register attendance in classes, industries etc.
although the RFID module costs a little, we can economically implement this in a large
scale. As an emerging technology this can effectively reduce much of our difficulties in
logging system and security system.
Advantages
1. Easier method of registering attendance.
2. Better facility for storage and archiving.
3. More reliable and efficient.
4. Multiple functions can be done, like attendance, data logging, security etc.
5. Components are easily available.
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 67/82
67
Disadvantages
1. RFID receiver has a very short range; tag has to in 15 cm distance of the
receiver
2. RFID reviver module is a little costly if we have to do it in small scale
3. Storage capacity of the EEPROM is limited, but we can easily improve this.
REFERENCES
1. The 8051 Microcontroller And Embedded Systems-
Muhammad Ali Mazidi
2. Op-Amps&Linear Integrated Circuits-Ramakant A
Gayakwad
3. www.8051projects.info
4. www.8051projects.net
5. www.alldatasheet.com
6. www.atmel.com
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 68/82
68
DATASHEETS
1.89S51
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 71/82
71
2. DS 1307
8/3/2019 Attendance Using RFID2
http://slidepdf.com/reader/full/attendance-using-rfid2 80/82
80
3. AT 24C08
Recommended