272 [Complete Course Design] RFID All-in-One Card Deduction and Recharge System Design Based on 51 Single Chip Microcomputer-RFID

[Resource Download] The download address is as follows:
https://docs.qq.com/doc/DTlRSd01BZXNpRUxl

Design of 51RFID All-in-One Card Deduction and Recharge System-RFID-LCD1602-KEY

This design is composed of STC89C52 single-chip circuit + RFID card reader module + liquid crystal LCD1602 display circuit + button circuit + serial port module PL2303 circuit + power supply circuit.

1. The deduction amount can be set by buttons K1 and K2, the amount is 0-20, and the button setting accuracy is 1.

2. Press the button K3 to enter the deduction state. If the RFID card is swiped, the deduction will begin.

3. Press button K4, the fee will be deducted, and press it once to deduct once.

4. LCD1602 displays the deduction amount and balance in real time.

5. If the system has any operation, the system uploads the current information to the computer through the serial port, otherwise it will not upload.

6. The LCD displays the card reading status in real time, whether the card is valid and whether there is a card status prompt.

7. After recharging, the amount is overcharged and the deduction amount is insufficient.

sbit key1 =P1^0;	//引脚定义
sbit key2 =P1^1;
sbit key3 =P1^2;
sbit key4 =P1^3;

/********************/
unsigned char cardId[4]={0xD6,0x5F,0x2A,0x79};	 //该出修改有效卡ID号

/********************/

unsigned char UID[5];	 //暂存卡号
unsigned char Temp[4] ;   //中间变量

unsigned long time_20ms;   //定时计数
xdata char dis0[16];			   //显示数组变量
xdata char dis1[25];			   //显示数组变量
bit disFlag;			   //显示更新标志
unsigned char timelater =0; //时间延时计数
unsigned char readCardFlag = 0;  //读卡状态
unsigned int SetNum = 10;//扣费金额
bit rekey =0;//防止重复按下
unsigned char yuE = 100;//余额

 

Guess you like

Origin blog.csdn.net/theroadon/article/details/109261563