Automatic Door System Using Password and Rfid Card
Automatic Door System Using Password and Rfid Card
CATEGORY OF FIGURE.............................................................................................IV
CATEGORY OF TABLE................................................................................................V
LIST OF ACRONYMS...................................................................................................VI
2.1 MICROCONTROLLERS.................................................................................................3
2.2 RFID APPLICATION.............................................................................................13
2.3 KEYPAD (3X4)..........................................................................................................15
2.4 LIQUID-CRYSTAL DISPLAY (LCD)...........................................................................16
2.5 ELECTROMAGNETIC DOOR LOCK..............................................................................18
CHAPTER 5. EXPERIMENT........................................................................................26
5.1 EXPERIMENTAL PROGRESS.......................................................................................26
5.2 EXPERIMENTAL RESULTS..........................................................................................26
CHAPTER 6. OUTCOME..............................................................................................34
6.1 ADVANTAGES...............................................................................................................34
6.2 DISADVANTAGES..........................................................................................................34
6.3 DEVELOPMENT.............................................................................................................35
PROGRAM 36
CATEGORY OF FIGURE
1- Pic 16F877a---------------------------------------------------------------------------------4
2- PIC16F877A General Structure----------------------------------------------------------5
3- RDM 6300---------------------------------------------------------------------------------14
4- Matrix keypad-----------------------------------------------------------------------------15
5- LCD 1602A------------------------------------------------------------------------------- 16
6- ASCII CODE TABLE FOR LCD------------------------------------------------------17
7- Electromagnetic door lock---------------------------------------------------------------18
8- Principle diagram on Proteus-----------------------------------------------------------22
9- PCB layout-------------------------------------------------------------------------------- 23
10- Actual circuit---------------------------------------------------------------------------- 23
11- Actual circuit---------------------------------------------------------------------------- 24
12- Complete mod---------------------------------------------------------------------------24
13-Main screen-------------------------------------------------------------------------------25
14- Enter the pass----------------------------------------------------------------------------26
15- Correct pass------------------------------------------------------------------------------26
16- Correct card------------------------------------------------------------------------------27
17- Incorrect pass----------------------------------------------------------------------------27
18- Incorrect card----------------------------------------------------------------------------28
19- Incorrectly more than 3 times---------------------------------------------------------29
20- Menu monitor----------------------------------------------------------------------------29
21- Change password------------------------------------------------------------------------29
CATEGORY OF TABLE
This system provides users with two options to unlock the door: entering a
password or scanning a card. If the correct password is entered, the system will give
users the option to change the password. However, users are only allowed a
maximum of three attempts to enter the password or scan the card. If this limit is
exceeded, the system will activate an alarm to alert the possibility of a thief
attempting to break in.Research purposes
Utilizing the knowledge gained from the study of microcontrollers, I aim to develop
an automatic door opening system that incorporates both a password and magnetic
card function. The purpose of this system is to enhance safety and security measures
for door access.
Smart magnetic door with accurate processing and good security, ensuring safety
for households, offices or factories.
The door access system mandates that users either input a password or scan a
magnetic card. Upon completing these actions, the LCD display will present one of
two statuses. If the user enters the correct password and successfully scans the card,
the LCD will exhibit a correct status message. However, if incorrect information is
entered or scanned, the LCD will show an error message and trigger the buzzer. If
PROJECT OF EMPLOYED SYSTEMS
Page 2/18
the number of allowed access attempts exceeds the maximum limit, an alarm siren
will blare. This automatic door opening system also facilitates the password change
function, providing users with an option to update their password as desired.
PROJECT OF EMPLOYED SYSTEMS
Page 3/18
2.1 Microcontrollers
– RA0: input/output
2 RA0/AN0 number
– RA1: output/import
3 RA1/AN1 numbers
numbers
– AN 2: analog input
– RA3: output/import
numbers
– RA4: output/import
numbers
– C1 OUT : 1 .
comparator output
– SS : auxiliary SPI
selection input
– C2 OUT : 2 .
PROJECT OF EMPLOYED SYSTEMS
Page 7/18
comparator output
– RE1 : output/import
numbers
– RE2: export/import
numbers
– CS : Control selection
10 RE2//CS/AN7
chip at parallel branch
port
when configured in RC
mode; another way of
CMOS.
– OSC2 : Quartz
oscillator output. Connect
to quartz or resonator.
14 OSC2/CLKO
– CLKO: in RC mode,
the output of OSC2,
equals the frequency of
OSC1 and indicates the
speed of the instruction
cycle.
– RC0 : input/output
number
– T1OCO : 1 . Timer
15 RC0/T1 OCO/T1CKI
oscillator input
– T1CKI : Timer 1 .
external clock input
numbers
– T1OSI: Timer 1 .
oscillator input
– RC2: output/import
numbers
– RC3: output/import
numbers
– SCK : synchronous
serial clock input/output
18 RC3/SCK/SCL
of SPI . mode
– SCL: synchronous
serial clock input/output
of I2C mode
– RD0: output/import
numbers
19 RD0/PSP0
– PSP0 : parallel branch
port data
numbers
– RD2: output/import
numbers
21 RD2/PSP2
– PSP2 : parallel branch
port data
– RD3: output/import
numbers
22 RD3/PSP3
– PSP3: parallel branch
port data
– RC4: output/import
numbers
– SDA: export/import
data to I2C
– RC5: output/import
24 RC5/SDO numbers
– TX: asynchronous
transmission USART
PROJECT OF EMPLOYED SYSTEMS
Page 11/18
– CK : USART
synchronous pulse
– RC7: output/import
numbers
– RX : get disagreement
26 RC7/RX/DT
USART
– DT : USART
synchronous data
– RD4: output/import
numbers
27 RD4/PSP
– PSP4: parallel branch
port data
– RD5: output/import
numbers
28 RD5/PSP5
– PSP5: parallel branch
port data
– RD6: output/import
numbers
29 RD6/PSP6
– PSP6: parallel branch
port data
– RD7: output/import
numbers
30 RD7/PSP7
– PSP7: parallel branch
port data
PROJECT OF EMPLOYED SYSTEMS
Page 12/18
– RB0: output/import
33 RB0/INT numbers
– RB3: output/import
numbers
36 RB3
– ICPS . low voltage
programming enable pin
– Export/import numbers
37 RB4
– PortB interrupt
– Export/import numbers
38 RB5
– PortB interrupt
– RB6: output/import
numbers
– PGC : ICSP
39 RB6/PGC
programming clock and
differential circuit
– PortB interrupt
numbers
– PGD: differential
circuit and ICSP
programming data
– PortB interrupt
An RFID tag comprises three integral components, including a chip that stores and
processes informational data, modulation and demodulation of radio frequency
signals, an antenna for signal reception and transmission, and a substrate. The RFID
tag's data is stored in EEPROM memory.
RFID tags come in three variations- passive, active, and battery-powered passive
tags. Active tags have a power source and can send data. Passive tags are usually
cheaper since they derive energy to power the IC from radio waves. RFID tags can
be read-only with a serial number, or read/write enabled, permitting the user to
write special data to the tag. Programmable tags can be written once and read
multiple times, while blank tags can be written with an electronic product code by
the user.
PROJECT OF EMPLOYED SYSTEMS
Page 14/18
When queried, RFID tags respond with their identifier (ID) information as well as
additional product or manufacturing data. Due to each RFID tag possessing a
unique serial number, an RFID system is designed to read multiple tags at once,
providing they are within the RFID reader's range.
Compact in its design, the RDM6300 RF 125kHz UART RFID transceiver module
is equipped with an RFID antenna, as well as transmission and reception circuits
utilizing the UART communication standard, set at a fixed Baudrate parameter of
9600, N, 8, 1. The accompanying RFID code will appear in the form of 10-digit
ASCII code, requiring users to select this specific encoding method in order to
accurately perceive the card code.
A key matrix is a grouping of buttons arranged in a grid pattern that feature rows
and columns for connectivity. The total number of available buttons is determined
by multiplying the number of rows by the number of columns. In contrast, to
command twelve buttons, we typically need sixteen General Purpose Input/Ouput
PROJECT OF EMPLOYED SYSTEMS
Page 15/18
(GPIO) pins. However, by applying matrix keys, it's only necessary to utilize eight
GPIO pins instead.
The LCD 1602A Blue is a 1602 character LCD module with a blue backlight. It
uses a Hitachi HD44780 driver chip to display alphanumeric characters and
symbols. The module has 16 pins, with pin 1 being the Ground and pin 2 being the
Power supply voltage. Pin 3 indicates the Contrast adjustment, while pins 4-6 and
11-14 relate to data input and output (D4-D7) and control signals (RS, RW, E),
respectively. Pins 15 and 16 are designated for the backlight.
The LCD 1602A module is widely used in various applications such as vending
machines, ATMs, medical devices, and appliances for displaying system status and
data.
The lock mechanism consists of two main components: the locking assembly and
the electromagnet. The locking assembly is installed on the door frame, and the
electromagnet is installed on the door itself. When an electric current is passed
through the electromagnet, it creates a powerful magnetic field that attracts the
locking bolt to the lock assembly, effectively securing the door.
One of the benefits of electromagnetic locks is that they are fail-safe, meaning they
will unlock automatically in the event of a power failure or emergency. They also
offer a high level of security, as they cannot be picked or tampered with easily. In
addition, they are easy to install and maintain, making them a popular choice for
many businesses and industries.
PIC 16F877A
BUZZER
POWER 12V
PROJECT OF EMPLOYED SYSTEMS
Page 21/18
START
INITIALIZATION
OF SYSTEM
ELECTROMAGNETIC
DOOR LOCK
INCORRECT INCORRECT
BUZZER
END
PROJECT OF EMPLOYED SYSTEMS
Page 22/18
CHAPTER 5. EXPERIMENT
The default password will be 6 numbers, it is: “111111”. When we in enter the
password program, we can't access by RFID.
When the password is correct, the LCD will be displayed. At this time the door will
be opened right then and don’t relock. If we want to relock, press “*”.
If we don't use a password to open the door, we can use a RFID card to do it
instead.
PROJECT OF EMPLOYED SYSTEMS
Page 28/18
When wrong 3 times, the system will automatically lock and alert the user.
Press 1 to change password, first, enter current password, then input new password
Press 2 to add new card, first, enter current password, then touch new card.
PROJECT OF EMPLOYED SYSTEMS
Page 31/18
CHAPTER 6. OUTCOME
6.1 Advantages
Fasted security: The door locking system using PIC 16F877A provides enhanced
security compared to traditional lock systems, as it requires a specific code to
unlock the door. This code can only be accessed by authorized personnel.
Easy to use: The door locking system using PIC 16F877A is easy to use and can be
operated by anyone without requiring any special skills or training.
Saves time: The door locking system using PIC 16F877A saves time by eliminating
the need for traditional keys, which can be lost or misplaced. This searching the
time-consuming process of searching for or replacing lost keys.
Cost-effective: The door locking system using PIC 16F877A is cost-effective
compared to other high-security systems. It requires minimal maintenance and can
be easily installed.
Integration with other systems: The PIC 16F877A microcontroller used in the door
locking system can be easily integrated with other systems such as CCTV cameras,
alarms, and other security systems to create a comprehensive security system.
6.2 Disadvantages
Vulnerable to hacking: Electronic door locking systems, including those using PIC
16F877A, are vulnerable to hacking by individuals with the appropriate skills and
knowledge. If the system is not secured correctly, hackers can gain access to the
door code and override the system.
Power failure: A door locking system using PIC 16F877A relies on a continuous
power supply. In the event of a power failure, the system will not function, and
manual override or backup systems may be required to unlock the door.
PROJECT OF EMPLOYED SYSTEMS
Page 32/18
6.3 Development
In order to mitigate power failures following an unexpected issue, the system will
be reinforced with additional backup power. This modification enhances the
system's flexibility, ensuring a hassle-free user experience during outages.
PROJECT OF EMPLOYED SYSTEMS
Page 33/18
Program
#include <main.h>
#include <lcd.c>
#use rs232(UART1,baud=9600,parity=N,bits=8,stream=UART_PORT,errors)
int8 CurrentState=STAMAIN; // Bien luu trang thai cua mach hien tai
int8 NextState=STAMAIN; // Bien luu trang thai cua mach tiep theo
int8 AdminPass[6]={1,2,3,4,5,6};
char RFIDAdmin[10]={'a','b','c','d','e','f','g','h','i','k'};
int8 WrongPassCount=0;
int8 WrongRFIDCount=0;
char UARTBuffer[70];
int8 ByteCount=0;
int8 RFIDResult=0; //=0 khong co the, =1 the hop le admin , =2 the khong hop le
void WritePassEEPROM()
{
write_eeprom(0, AdminPass[0]);
PROJECT OF EMPLOYED SYSTEMS
Page 35/18
write_eeprom(1, AdminPass[1]);
write_eeprom(2, AdminPass[2]);
write_eeprom(3, AdminPass[3]);
write_eeprom(4, AdminPass[4]);
write_eeprom(5, AdminPass[5]);
}
void WriteRFID()
{
write_eeprom(15, RFIDAdmin[0]);
write_eeprom(16, RFIDAdmin[1]);
write_eeprom(17, RFIDAdmin[2]);
write_eeprom(18, RFIDAdmin[3]);
write_eeprom(19, RFIDAdmin[4]);
write_eeprom(20, RFIDAdmin[5]);
write_eeprom(21, RFIDAdmin[6]);
write_eeprom(22, RFIDAdmin[7]);
write_eeprom(23, RFIDAdmin[8]);
write_eeprom(24, RFIDAdmin[9]);
}
void ReadRFID()
{
RFIDAdmin[0]=read_eeprom(15);
RFIDAdmin[1]=read_eeprom(16);
RFIDAdmin[2]=read_eeprom(17);
RFIDAdmin[3]=read_eeprom(18);
RFIDAdmin[4]=read_eeprom(19);
RFIDAdmin[5]=read_eeprom(20);
RFIDAdmin[6]=read_eeprom(21);
RFIDAdmin[7]=read_eeprom(22);
RFIDAdmin[8]=read_eeprom(23);
RFIDAdmin[9]=read_eeprom(24);
void ReadPassfromEEPROM()
PROJECT OF EMPLOYED SYSTEMS
Page 36/18
int8 EEPROMData;
// doc pass phu 1
EEPROMData=read_eeprom(0);
if(EEPROMData==0xFF) // ROM trang khong co du lieu
{
WritePassEEPROM();// ghi gia tri mac dinh vao eeprom
}
else // neu rom co du lieu thi doc ma mat ma luu vao mang
{
AdminPass[0]=read_eeprom(0);
AdminPass[1]=read_eeprom(1);
AdminPass[2]=read_eeprom(2);
AdminPass[3]=read_eeprom(3);
AdminPass[4]=read_eeprom(4);
AdminPass[5]=read_eeprom(5);
}
int8 ScanKeyboard(void)
{
output_low(KC1);
if(!input(KR1))
{
while(!input(KR1));
delay_ms(10);
return KEY1;
}
if(!input(KR2))
{
while(!input(KR2));
PROJECT OF EMPLOYED SYSTEMS
Page 37/18
delay_ms(10);
return KEY4;
}
if(!input(KR3))
{
while(!input(KR3));
delay_ms(10);
return KEY7;
}
if(!input(KR4))
{
while(!input(KR4));
delay_ms(10);
return KEYSTAR;
}
output_high(KC1);
output_low(KC2);
if(!input(KR1))
{
while(!input(KR1));
delay_ms(10);
return KEY2;
}
if(!input(KR2))
{
while(!input(KR2));
delay_ms(10);
return KEY5;
}
if(!input(KR3))
{
while(!input(KR3));
PROJECT OF EMPLOYED SYSTEMS
Page 38/18
delay_ms(10);
return KEY8;
}
if(!input(KR4))
{
while(!input(KR4));
delay_ms(10);
return KEY0;
}
output_high(KC2);
output_low(KC3);
if(!input(KR1))
{
while(!input(KR1));
delay_ms(10);
return KEY3;
}
if(!input(KR2))
{
while(!input(KR2));
delay_ms(10);
return KEY6;
}
if(!input(KR3))
{
while(!input(KR3));
delay_ms(10);
return KEY9;
}
if(!input(KR4))
{
while(!input(KR4));
PROJECT OF EMPLOYED SYSTEMS
Page 39/18
delay_ms(10);
return KEYHASH;
}
output_high(KC3);
return NOKEY;
void OnBuzzer()
{
output_high(PIN_C2);// Mo Loa
}
void OffBuzzer()
{
output_Low(PIN_C2);// tat Loa
}
int8 CheckPass() // ham kiem tra mat ma, ket qua tra ve 0 - mat ma sai, tra ve 1 mat ma dung
{
int i;
for(i=0;i<6;i++) // kiem tra pass add min
{
if(CurrentPass[i]!=AdminPass[i]) // neu phat hien 1 mat ma sai thi thoat vong lam
{
return 0;
}
}
return 1;
void DisplayMain()
{
lcd_putc("\f");
lcd_putc("KHOA MAT MA-RFID");
lcd_gotoxy(1, 2);
PROJECT OF EMPLOYED SYSTEMS
Page 41/18
void DisplayInputPass()
{
lcd_putc("\f");
lcd_putc(" NHAP MAT MA");
lcd_gotoxy(1, 2);
void DisplayMenu1()
{
lcd_putc("\f");
lcd_putc("1.DOI PASS");
lcd_gotoxy(1, 2);
lcd_putc("2.DOI THE RFID");
}
void DisplayChangePass()
{
lcd_putc("\f");
lcd_putc("NHAP PASS MOI");
lcd_gotoxy(1, 2);
}
void DisplayAddRFID()
{
lcd_putc("\f");
lcd_putc("CHAM THE RFID MOI");
lcd_gotoxy(1, 2);
}
void ClearUARTBuffer()
{
PROJECT OF EMPLOYED SYSTEMS
Page 42/18
ByteCount=0;
}
void ProcessRFID()
{
int8 i;
delay_ms(100);
ClearUARTBuffer();
#INT_RDA
void RDA_isr(void)
{
char c = getc();
UARTBuffer[ByteCount]=c;
ByteCount++;
if(ByteCount==13)
{
ByteCount=0;
ProcessRFID();
}
else if(ByteCount>69)
PROJECT OF EMPLOYED SYSTEMS
Page 43/18
{
ByteCount=0;
}
}
void main()
{
int8 CheckPassResult;
SET_TRIS_D(0x00);
SET_TRIS_C(0x80); // uart
Set_tris_B(0xF0);// cai dat port B 0-3 output, 4-7 input
port_B_pullups(0xFF);
output_high(KC1);// dua dua cac chan cot phim len cao
output_high(KC2);
output_high(KC3);
enable_interrupts(INT_RDA);
enable_interrupts(GLOBAL);
while(true)
{
if(WrongPassCount>=3||WrongRFIDCount>=3)
{
OnBuzzer(); // bat coi keu lien tuc khi nhap sai qua 3 lan
}
PROJECT OF EMPLOYED SYSTEMS
Page 44/18
lcd_gotoxy(1, 2);
lcd_putc("THE KHONG HOP LE");
Beep(3); // beep loa 3 tieng
if(WrongRFIDCount<3) WrongRFIDCount++;
if(WrongRFIDCount==3)
{
lcd_gotoxy(1, 2);
lcd_putc(" BAO DONG!! ");
}
delay_ms(1000);
DisplayMain();
}
}
else if(CurrentState==STAADDRFID) // dang them the
{
lcd_gotoxy(1, 2);
lcd_putc("DA THEM THE RFID");
Beep(1); // beep loa 1 tieng
RFIDAdmin[0]=UARTBuffer[1];
RFIDAdmin[1]=UARTBuffer[2];
PROJECT OF EMPLOYED SYSTEMS
Page 45/18
RFIDAdmin[2]=UARTBuffer[3];
RFIDAdmin[3]=UARTBuffer[4];
RFIDAdmin[4]=UARTBuffer[5];
RFIDAdmin[5]=UARTBuffer[6];
RFIDAdmin[6]=UARTBuffer[7];
RFIDAdmin[7]=UARTBuffer[8];
RFIDAdmin[8]=UARTBuffer[9];
RFIDAdmin[9]=UARTBuffer[10];
WriteRFID();
delay_ms(1000);
CurrentState=STAMAIN;
DisplayMain();
}
RFIDResult=0; // sau khi xu ly thong tin RFID thi reset bien de cho the tiep theo
}
}
else if(CurrentState==STAINPUTPASS||CurrentState==STACHANGEPASS)
{
if(CurrentCodeIndex<6) //neu nhap chua du 6 ky tu
{
CurrentPass[CurrentCodeIndex]=CurrentKey; // luu so vua bam vao mang
lcd_putc('*'); // hien thi dau sao cho phim da bam
CurrentCodeIndex++;// chuyen sang vi tri tiep theo
}
}
else if(CurrentState==STAMENU1&&CurrentKey==KEY1)
{
CurrentState=STAINPUTPASS; // cai trang tahi hien tai la nhap pass
NextState=STACHANGEPASS;
DisplayInputPass();
}
else if(CurrentState==STAMENU1&&CurrentKey==KEY2)
{
CurrentState=STAINPUTPASS; // cai trang tahi hien tai la nhap pass
NextState=STAADDRFID;
DisplayInputPass();
break;
}
}
else if(CurrentState==STAINPUTPASS&&NextState==STAUNLOCK) // neu dang nhap pass de
mo
{
CheckPassResult=CheckPass(); // kiem tra mat ma nhap vao
if(CheckPassResult==0) //neu sai pass thi thong bao
{
lcd_gotoxy(1, 2);
lcd_putc(" SAI MAT MA! ");
Beep(3); // beep loa 3 tieng
delay_ms(1000);
ResetInput(); // xoa du lieu da nhap
DisplayInputPass();
if(WrongPassCount<3) WrongPassCount++;
if(WrongPassCount==3)
{
lcd_gotoxy(1, 2);
lcd_putc(" BAO DONG!! ");
delay_ms(1000);
DisplayInputPass();
}
}
else
{
WrongPassCount=0; // xoa so lan sai
WrongRFIDCount=0; // xoa so lan sai
lcd_gotoxy(1, 2);
lcd_putc(" XIN MOI VAO! ");
UnLockGate();
Beep(1); // beep loa 1 tieng
delay_ms(1000);
ResetInput(); // xoa du lieu da nhap
CurrentState=STAUNLOCK;
}
}
else if(CurrentState==STAINPUTPASS&&NextState==STACHANGEPASS)
{
CheckPassResult=CheckPass(); // kiem tra mat ma nhap vao
PROJECT OF EMPLOYED SYSTEMS
Page 48/18
lcd_gotoxy(1, 2);
lcd_putc(" SAI MAT MA! ");
Beep(3); // beep loa 3 tieng
delay_ms(1000);
ResetInput(); // xoa du lieu da nhap
DisplayInputPass();
}
}
else if(CurrentState==STAINPUTPASS&&NextState==STAADDRFID)
{
CheckPassResult=CheckPass(); // kiem tra mat ma nhap vao
if(CheckPassResult==1) //neu nhap dung pass addmin
{
DisplayAddRFID();
Beep(1); // beep loa 1 tieng
ResetInput(); // xoa du lieu da nhap
CurrentState=STAADDRFID; // tro ve man hinh them the
}
else
{
lcd_gotoxy(1, 2);
lcd_putc(" SAI MAT MA! ");
Beep(3); // beep loa 3 tieng
delay_ms(1000);
ResetInput(); // xoa du lieu da nhap
DisplayInputPass();
PROJECT OF EMPLOYED SYSTEMS
Page 49/18
}
else if(CurrentState==STACHANGEPASS)
{
if(CurrentCodeIndex<6) //neu nhap chua du 6 ky tu
{
lcd_gotoxy(1, 2);
lcd_putc("CHUA DU 6 KY TU!");
Beep(3); // beep loa 3 tieng
delay_ms(1000);
ResetInput(); // xoa du lieu da nhap
DisplayChangePass();
}
else
{
AdminPass[0]=CurrentPass[0];
AdminPass[1]=CurrentPass[1];
AdminPass[2]=CurrentPass[2];
AdminPass[3]=CurrentPass[3];
AdminPass[4]=CurrentPass[4];
AdminPass[5]=CurrentPass[5];
WritePassEEPROM();
lcd_gotoxy(1, 2);
lcd_putc(" DA LUU MA MOI! ");
Beep(2);
delay_ms(1000);
CurrentState=STAMAIN;
ResetInput(); // xoa du lieu da nhap
DisplayMain();
}
}
break;
}
case KEYSTAR:// Neu bam phim sao
{
if(CurrentState==STAUNLOCK)
PROJECT OF EMPLOYED SYSTEMS
Page 50/18
{
LockGate();
Beep(2);
CurrentState=STAMAIN;
ResetInput(); // xoa du lieu da nhap
DisplayMain();
}
else if(CurrentState==STAINPUTPASS||CurrentState==STAMENU1||
CurrentState==STAADDRFID)
{
ResetInput(); // xoa du lieu da nhap
CurrentState=STAMAIN;
DisplayMain();
}
else if(CurrentState==STACHANGEPASS)
{
Beep(2);
CurrentState=STAMAIN;
ResetInput(); // xoa du lieu da nhap
DisplayMain();
}
break;
}
}
}
}
}