資源簡(jiǎn)介
密碼電子鎖proteus仿真,數(shù)碼管顯示,矩陣鍵盤,含keil程序。
代碼片段和文件信息
#include?
#define?uchar?unsigned?char
#define?uint??unsigned?int
uchar?const?pwd[6]={123456};
sbit??BEEP=P3^0; //定義蜂鳴器
sbit??KEY=P3^1; //定義蜂鳴器???
uchar??temp; //暫存器
uchar??key;???????????????//鍵順序嗎
int?w=0;
uchar?code?bit_tab[]={0xfe0xfd0xfb0xf70xef0xdf0xbf0x7f};//位選表用來選擇哪一只數(shù)碼管進(jìn)行顯示
uchar?code?seg_data[]={0xc00xf90xa40xb00x990x920x820xf80x800x900x880x830xc60xa10x860x8e0xff0xBF};
//0123456789ABCDEF-的顯示碼
uchar?const?f_buf[6]={171717171717};
uchar?disp_buf[]={171717171717}; //定義顯示緩沖單元并賦值
int?flag=0count=0;
/********以下是延時(shí)函數(shù)********/
void?Delay_ms(uint?xms)
{
uint?ij;
for(i=xms;i>0;i--) ??????//i=xms即延時(shí)約xms毫秒
for(j=110;j>0;j--);
}
/*********以下是蜂鳴器響一聲函數(shù)********/
void??beep()
{
??BEEP=0
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-05-04?18:24??ledkey\
?????文件??????129161??2013-05-04?18:16??ledkey\Last?Loaded?led密碼鎖.DBK
?????文件????????8651??2013-05-04?18:23??ledkey\led
?????文件????????4635??2013-05-04?18:23??ledkey\led.c
?????文件????????2664??2013-05-04?18:23??ledkey\led.hex
?????文件??????????54??2013-05-04?18:23??ledkey\led.lnp
?????文件???????11089??2013-05-04?18:23??ledkey\led.LST
?????文件???????12884??2013-05-04?18:23??ledkey\led.M51
?????文件????????9669??2013-05-04?18:23??ledkey\led.OBJ
?????文件?????????979??2013-05-04?18:24??ledkey\led.plg
?????文件???????77546??2013-05-04?18:24??ledkey\led.uvgui.Administrator
?????文件???????74244??2013-05-04?18:16??ledkey\led.uvgui_Administrator.bak
?????文件????????5681??2013-05-04?18:24??ledkey\led.uvopt
?????文件???????13431??2013-05-02?20:25??ledkey\led.uvproj
?????文件????????5685??2013-05-04?18:16??ledkey\led_uvopt.bak
?????文件???????????0??2013-05-02?18:27??ledkey\led_uvproj.bak
?????文件??????129150??2013-05-04?18:24??ledkey\led密碼鎖.DSN
?????文件?????????768??2013-05-04?18:24??ledkey\led密碼鎖.PWI
?????文件????????6376??2009-05-07?14:37??ledkey\STARTUP.A51
?????文件???????14048??2013-05-04?18:23??ledkey\STARTUP.LST
?????文件?????????749??2013-05-04?18:23??ledkey\STARTUP.OBJ
- 上一篇:虛擬儀器的發(fā)展前景
- 下一篇:51單片機(jī)時(shí)鐘匯編程序
評(píng)論
共有 條評(píng)論