欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標(biāo)題:
UHF門禁系統(tǒng)源碼
[打印本頁]
作者:
SZYASL
時(shí)間:
2018-5-31 11:00
標(biāo)題:
UHF門禁系統(tǒng)源碼
單片機(jī)源程序如下:
/*****************************************************************
使用說明:LED3閃爍后才可放卡,若刷卡過程中LED3閃爍兩次,則說明刷卡
錯(cuò)誤,需重新刷卡,登記標(biāo)簽時(shí),若成功蜂鳴器響LED3亮?xí)貜?fù)兩次
******************************************************************/
#include "reg52.h"
#define main_globals
#include "main.h"
#include "uart.h"
#include "lcd12864.h"
#include "beep.h"
#include "key.h"
#include "timer.h"
#include "eeprom.h"
#include "ctrl.h"
#include "UHF2010.h"
uchar states=0,t2flag=0;
void init_all(void) //初始化
{
uchar status=0x01;
EA = 0; //關(guān)總中斷
init_timer(); //定時(shí)器初始化
init_uart(); //串口初始化
lcd_init(); //LCD初始化
EA = 1; //開總中斷
EEPROM_READ(0,UII_BUF,40); //EEPROM初始化,取出記錄的卡號(hào)
LengthUII = ((( UII_BUF[0] >> 3) & 0x1F) +1)*2; //計(jì)算UII長度
EEPROM_READ(45,KEY_BUF,8); //EEPROM初始化,取出記錄的密碼
while(status != 0x00)
status = UHFCheckConnect(); //檢查連接狀態(tài)
}
void main(void) //主函數(shù)
{
uchar key,status=0x80;
Delay_ms(500); //讓硬件穩(wěn)定
init_all(); //執(zhí)行初始化函數(shù)
relay_OFF(); //關(guān)繼電器
LED_BLINK_1(); //led test
beep1(); //beep test
display(0,0,0); //顯示初始化
while(1)
{
key=key_scan(); //按鍵操作
if(key==12) if(states>0) states--;
else states=0; //上一功能
if(key==13) if(++states>3) states=3; //下一功能
ctrl_process();
}
}
復(fù)制代碼
所有資料51hei提供下載:
UHF門禁系統(tǒng).zip
(156.02 KB, 下載次數(shù): 11)
2018-5-31 10:59 上傳
點(diǎn)擊文件名下載附件
萬整例程
下載積分: 黑幣 -5
歡迎光臨 (http://m.raoushi.com/bbs/)
Powered by Discuz! X3.1