freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于單片機(jī)語音智能密碼鎖設(shè)計(參考版)

2024-09-02 17:43本頁面
  

【正文】 TR0=0。 sec++。 count_5ms++。 //若按下了 E鍵 ,則跳轉(zhuǎn)到標(biāo)志 START處重新開始 53 } } } /**********定時中斷 ****************/ void timer0() interrupt 1 { TH0=0xee。//若按下了 E鍵 ,則跳轉(zhuǎn)到標(biāo)志 START處重新開始 } if(flag_p==0) { MatrixKey()。 if(key==0x0e)goto START。//鍵盤掃描 if(key==0x0b)//若有 B按下 進(jìn)入密碼重設(shè) { PassSet()。 //若 2s到 ,則將 2s標(biāo)志位清 0 PassIn()。 if(flag_2s==1)flag_2s=0。 //啟動定時器 Delay_ms(500)。 //若按下的不是 A鍵 ,跳轉(zhuǎn)到標(biāo)號 SCAN處繼續(xù)掃描 //Uart_SendString(shuru)。//等待按鍵按下 SCAN: MatrixKey()。 //從 24Cxx的 0x00開始的單元中讀出 6個密碼存52 入 code_buf[]數(shù)組中 P1=0xf0。 //調(diào)入清屏函數(shù) StartDisp()。 //I2C初始化 START: RELAY=1。 lcd_init()。 ES = 1。 //允許定時器 1工作 TH1 = 0xfd。//打開定時器 0 SCON = 0x50。 EA=1。//定時器 0 方式 1 定時器 1 工作在方式 2 TH0=0xee。 CodeSetOk()。 //語音播報重設(shè)密碼 write_nbyte(0xa0,0x00,code_buf,6)。beep()。} beep()。 if(count=6){count=0。 lcd_x++。 lcd_wdat(code_buf[count]+0x30)。(key=9)) //鍵值‘ 09’有效,其余無效 { code_buf[count]=key。 if((key=0)amp。//鍵盤掃描 P1=0xf0。 //語音播報重設(shè)密碼 do{ P1=0xf0。 //調(diào)入清屏函數(shù) CodeSetDisp()。//顯示指針,注意是靜態(tài)局部變量 static uchar count=0。 } else goto PASSWORD。 flag_p=0。 //語音播報密碼錯誤 code_n++。 RELAY=0。 flag_p=1。beep()。 //語音 播報密碼輸入正確提示 CodeInOk()。lcd_x=0。 } } } while(count6)。 //顯示為 *,0x2a是 *的 LCD顯示碼 count++。//鍵值 存入數(shù)組 lcd_wcmd((0x49+lcd_x)|0x80)。amp。 49 while(P1!=0xf0)。 if(P1!=0xf0)//若有按鍵按下 { MatrixKey()。//閉鎖 CodeInDisp()。 //密碼輸入次數(shù) PASSWORD: lcd_clr()。 //顯示指針 ,注意是靜態(tài)局部變量 static uchar count=0。 i++。\039。 i = 0。 i++。\039。 i = 0。 lcd_clr()。 i++。\039。 i = 0。 i++。\039。 i = 0。 lcd_clr()。 i++。\039。 i = 0。 i++。\039。 i = 0。 lcd_clr()。 i++。\039。 i = 0。 i++。\039。 i = 0。 lcd_clr()。 i++。\039。 i = 0。 i++。\039。 i = 0。 lcd_clr()。 i++。\039。 i = 0。 i++。\039。 i = 0。 lcd_clr()。 uchar code setok_line2[] = { MODIFY OK }。 uchar code modify_line2[] = {PASSWORD: }。 uchar code inerr_line2[] = { INPUT ERR }。 uchar code inok_line2[] = { INOPUT OK }。 uchar code in_line2[] = {PASSWORD: }。 uchar code line2_data[] = { MADE IN TANNING }。 0x0f。 while(temp!=0x0f) { temp=P1。 temp=temp amp。 } temp=P1。 case 0x77:key=15。 case 0x7b:key=14。 case 0x7d:key=13。 switch(temp) { case 0x7e:key=12。 0x0f。 temp=P1。 0x0f。 temp=P1。 } } } P1=0xff。 temp=temp amp。 0x0f。 beep()。break。break。break。break。 if (temp!=0x0f) { temp=P1。 temp=temp amp。 if (temp!=0x0f) { Delay_ms(10)。 temp=temp amp。 P1=0xbf。 0x0f。 while(temp!=0x0f) { temp=P1。 temp=temp amp。 } temp=P1。 case 0xd7:key=7。 case 0xdb:key=6。 case 0xdd:key=5。 switch(temp) { case 0xde:key=4。 0x0f。 temp=P1。 0x0f。 temp=P1。 } } } P1=0xff。 temp=temp amp。 0x0f。 beep()。break。break。break。break。 if (temp!=0x0f) { temp=P1。 temp=temp amp。 if (temp!=0x0f) { Delay_ms(10)。 temp=temp amp。 P1=0xef。 i++。 while(!TI)。 //清零發(fā)送標(biāo)志位 } */ /********串口發(fā)送一個字符串函數(shù) ****************/ void Uart_SendString( uchar *trdata) { uchar i=0。 //待發(fā)送的數(shù)據(jù)寫入緩沖區(qū) while(!TI)。 Delay_ms(300)。 Delay_ms(300)。 。 。 //重新輸入密碼 const uchar rshuru[]=G\x12 。//輸入密碼語音提示 const uchar eshuru[]=G 密碼錯誤,請重新輸入密碼。 const uchar shuru[]=G 請輸入密碼。 bit flag_2s=0。//蜂鳴器 sbit RELAY=P3^6。 uchar temp。 uchar incode_buf[6]。 if(key==0x0e)goto start。 if(key==0x0c)WriteCode()。 } while(1) { P1=0xf0。) { lcd_wdat(line2_data[i])。 while(line2_data[i] != 39。 } lcd_wcmd(0x40|0x80)。) { lcd_wdat(line1_data[i])。 while(line1_data[i] != 39。 lcd_wcmd(0x00|0x80)。 lcd_init()。 BEEP=0。 lcd_wdat(code_buf[j]+0x30)。j6。 } read_nbyte (0xa0 ,0x00,code_buf,6)。) { lcd_wdat(R_line2_data[i])。 while(R_line2_data[i] != 39。 } lcd_wcmd(0x40|0x80)。) { lcd_wdat(R_line1_data[i])。 while(R_line1_data[i] != 39。 lcd_wcmd(0x00|0x80)。 } void ReadCode() { uchar i,j。 } CodeIn()。) { lcd_wdat(W_line2_data[i])。 while(W_line2_data[i] != 39。 } 36 lcd_wcmd(0x40|0x80)。) { lcd_wdat(W_line1_data[i])。 while(W_line1_data[i] != 39。 lcd_wcmd(0x00|0x80)。} } void WriteCode() { uchar i。 if(count=6){count=0。 lcd_x++。 lcd_wdat(code_buf[count] +0x30)。(key=9)) { code_buf[count]=key。 if((key=0)amp。 do{ P1=0xf0。 void CodeIn() { 35 static uchar lcd_x=0。 uchar code R_line1_data[] = { READ CODE }。 uchar code W_line1_data[] = { WRITE CODE }。 READ }。 0x0f。 while(temp!=0x0f) { temp=P1。 temp=temp amp。 } temp=P1。 case 0x77:key=15。 case 0x7b:key=14。 case 0x7d:key=13。 switch(temp) { case 0x7e:key=12。 0x0f。 temp=P1。 0x0f。 temp=P1。 } } } P1=0xff。 temp=temp amp。 0x0f。 beep()。break。break。break。break。 if (temp!=0x0f) { temp=P1。 temp=temp amp。 if (temp!=0x0f) { Delay_ms(10)。 temp=temp amp。 P1=0xbf。 0x0f。 while(temp!=0x0f) { temp=P1。 temp=temp amp。 } temp=P1。 case 0xd7:key=7。 case 0xdb:key=6。 case 0xdd:key=5。 switch(temp) { case 0xde:key=4。 0x0f。 temp=P1。 0x0f。 temp=P1。 } } } P1=0xff。 temp=temp amp。 0x0f。 beep()。break。break。break。break。 if (temp!=0x0f) { temp=P1。 temp=temp amp。 if (temp!=0x0f) 31 { Delay_ms(10)。 temp=temp amp。 P1=0xef。 Delay_ms(100)。 Delay_ms(100)。 sbit BEEP=P3^7。 uchar key。 Delay_ms(5)。 30 Delay_ms(5)。 Delay_ms(5)。 Delay_ms(5)。 Delay_ms(5)。 Delay_ms(5)。 } void lcd_init() { Delay_ms(15)。 } void lcd_clr() { lcd_wcmd(0x01)。 _nop_()。 _nop_()。 LCD_EN = 1。 _nop_()。 _nop_()。 LCD_EN = 0。 LCD_RS = 1。 LCD_EN = 0。 _nop_()。 _nop_(
點擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1