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

正文內(nèi)容

基于單片機(jī)語(yǔ)音智能密碼鎖設(shè)計(jì)(編輯修改稿)

2025-04-08 17:50 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 結(jié)構(gòu) AT24C04 芯片儲(chǔ)存密碼 、并且通過 LCD 顯示屏和 LED 燈直觀地顯示各密碼鎖各種狀態(tài),用繼電器模擬鎖的狀態(tài),用戶可以自定義設(shè)置 6 位的數(shù)字密碼,系統(tǒng)還具有報(bào)警功能,該系統(tǒng)基本 能夠?qū)崿F(xiàn)本文能夠提出的功能和要求。 本設(shè)計(jì)也存在不足,缺陷一,單重的密碼鎖不能滿足較高的安全需要。缺陷二,該系統(tǒng)對(duì)電的依賴比較大,必須使 24C04 一直保持供電狀態(tài),當(dāng)斷電后不能正常工作。缺點(diǎn)三,在按鍵按下時(shí),按鍵聲不夠響亮清晰,在仿真時(shí)顯得反映21 比較慢,假如能采用語(yǔ)音模塊,能用語(yǔ)音播報(bào)按鍵時(shí)密碼所處狀態(tài),密碼鎖將會(huì)更具人性化。 通過這次對(duì)智能密碼鎖的設(shè)計(jì),感受更多的是自己的能力有限,知識(shí)不夠豐富,知識(shí)點(diǎn)掌握的不夠扎實(shí),使得自己不能按自己初始設(shè)想完成自己的設(shè)計(jì),使得所設(shè)的密碼鎖不夠完整。在這次設(shè)計(jì)中還讓 ,讓我了解了實(shí)時(shí)控制的原理,懂得怎樣合理的使用芯片,發(fā)揮其功能。體會(huì)到做設(shè)計(jì)時(shí)必須有條理的按一定步驟實(shí)行系統(tǒng)的設(shè)計(jì)、各個(gè)步驟的實(shí)施??傊?,這次課程設(shè)計(jì)使在電路設(shè)計(jì)方面受益匪淺。 參考文獻(xiàn) [1] 林立 .張俊亮 .曹旭東 .劉得軍 .單片機(jī)原理及應(yīng)用 : 基于 Proteus和 Keil C [M].北京:電子工業(yè)出版社 , 2021: 25. [2] 鄭鋒 .王巧芝 .李英建 .劉瑞國(guó) .51單片機(jī)應(yīng)用系統(tǒng)典型模塊開發(fā)大全 [M].北京:中國(guó)鐵道出版社 ,2021: 520. [3] 張俊謨 .單片機(jī)中級(jí)教程 [M].北京:北京航空 航天大學(xué)出版 ,2021: 3645. [4] 單片機(jī)高級(jí)語(yǔ)言 C51 Windows環(huán)境編程與應(yīng)用 [M],電子工業(yè)出版社, 2021: 8695. [5] AT89C51 DATA SHEEP[M] .Philips Semiconductors,1999: 1536. [6] 康華光 .電子技術(shù)基礎(chǔ) (第 5版 )[M].北京:高等教育出版社 ,2021: 4548. [7] 彭華林等編 .數(shù)字電子技術(shù) [M].長(zhǎng)沙:湖南大學(xué)出版社 ,2021: 4560. [8] 金唯香等編 .電子測(cè)試技術(shù) [M].長(zhǎng)沙:湖南大學(xué)出版社 ,2021: 2630. 22 附件 AT24C04頭文件 include define uchar unsigned char define uint unsigned int sbit SDA = P3^4。 sbit SCL = P3^3。 bit ack。 void delayNOP()。 void I2C_start()。 void I2C_stop()。 void I2C_init()。 void I2C_Ack()。 void I2C_NAck()。 uchar RecByte()。 uchar SendByte(uchar write_data) 。 uchar read_nbyte (uchar SLA,uchar SUBA,uchar *pdat,uchar n)。 uchar write_nbyte(uchar SLA,uchar SUBA,uchar *pdat,uchar n)。 void delayNOP() { _nop_()。_nop_()。 _nop_()。_nop_()。 } void I2C_start() { SDA = 1。 SCL = 1。 delayNOP()。 SDA = 0。 23 delayNOP()。 SCL = 0。 } void I2C_stop() { SDA = 0。 SCL = 1。 delayNOP()。 SDA = 1。 delayNOP()。 SCL = 0。 } void I2C_init() { SCL = 0。 I2C_stop()。 } void I2C_Ack() { SDA = 0。 SCL = 1。 delayNOP()。 SCL = 0。 SDA = 1。 } void I2C_NAck() { SDA = 1。 SCL = 1。 delayNOP()。 24 SCL = 0。 SDA = 0。 } uchar RecByte() { uchar i,read_data。 read_data=0x00。 SDA=1。 for(i = 0。 i 8。 i++) { SCL = 1。 read_data = 1。 read_data |= SDA。 delayNOP()。 SCL = 0。 delayNOP()。 } SCL = 0。 delayNOP()。 return(read_data)。 } uchar SendByte(uchar write_data) { uchar i。 for(i = 0。 i 8。 i++) { SDA = (bit)(write_data amp。 0x80)。 _nop_()。 _nop_()。 25 SCL = 1。 delayNOP()。 SCL = 0。 write_data = 1。 } delayNOP()。 SDA = 1。 SCL = 1。 delayNOP()。 if(SDA==1) ack=0。 else ack=1。 SCL = 0。 delayNOP()。 return ack。 } uchar write_nbyte(uchar SLA,uchar SUBA,uchar *pdat,uchar n) { uchar s。 I2C_start()。 SendByte(SLA)。 if(ack==0) return(0)。 SendByte(SUBA)。 if(ack==0) return(0)。 for(s=0。 sn。 s++) { SendByte(*pdat)。 if(ack==0) return(0)。 pdat++。 26 } I2C_stop()。 return(1)。 } uchar read_nbyte (uchar SLA,uchar SUBA,uchar *pdat,uchar n) { uchar s。 I2C_start()。 SendByte(SLA)。 if(ack==0) return(0)。 SendByte(SUBA)。 if(ack==0) return(0)。 I2C_start()。 SendByte(SLA+1)。 if(ack==0) return(0)。 for(s=0。 sn。 s++) { *pdat=RecByte()。 I2C_Ack()。 pdat++。 } I2C_NAck()。 I2C_stop()。 return(1)。 } 1602頭文件 include include define uchar unsigned char define uint unsigned int 27 sbit LCD_RS=P2^0。 sbit LCD_RW=P2^1 。 sbit LCD_EN=P2^2。 void Delay_ms(uint xms) 。 bit lcd_busy()。 void lcd_wcmd(uchar cmd)。 void lcd_wdat(uchar dat) 。 void lcd_clr() 。 void lcd_init() 。 void Delay_ms(uint xms) { uint i,j。 for(i=xms。i0。i) for(j=110。j0。j)。 } bit lcd_busy() { bit result。 LCD_RS = 0。 LCD_RW = 1。 LCD_EN = 1。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 result = (bit)(P0amp。0x80)。 LCD_EN = 0。 return result。 28 } void lcd_wcmd(uchar cmd) { while(lcd_busy())。 LCD_RS = 0。 LCD_RW = 0。 LCD_EN = 0。 _nop_()。 _nop_()。 P0 = cmd。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 LCD_EN = 1。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 LCD_EN = 0。 } void lcd_wdat(uchar dat) { while(lcd_busy())。 LCD_RS = 1。 LCD_RW = 0。 LCD_EN = 0。 P0 = dat。 _nop_()。 29 _nop_()。 _nop_()。 _nop_()。 LCD_EN = 1。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 LCD_EN = 0。 } void lcd_clr() { lcd_wcmd(0x01)。 Delay_ms(5)。 } void lcd_init() { Delay_ms(15)。 lcd_wcmd(0x38)。 Delay_ms(5)。 lcd_wcmd(0x38)。 Delay_ms(5)。 lcd_wcmd(0x38)。 Delay_ms(5)。 lcd_wcmd(0x0c)。 Delay_ms(5)。 lcd_wcmd(0x06)。 30 Delay_ms(5)。 lcd_wcmd(0x01)。 Delay_ms(5)。 } 設(shè)定初始密碼程序 include include include define uchar unsigned char define uint unsigned int uchar code_buf[6]={1,2,3,4,5,6}。 uchar key。 uchar temp。 sbit BEEP=P3^7。 void beep() { BEEP=0。 Delay_ms(100)。 BEEP=1。 Delay_ms(100)。 } void MatrixKey() { P1=0xff。 P1=0xef。 temp=P1。 temp=temp amp。 0x0f。 if (temp!=0x0f) 31 { Delay_ms(10)。 temp=P1。 temp=temp amp。 0x0f。 if (temp!=0x0f) { temp=P1。 switch(temp) { case 0xee:key=0。break。 case 0xed:key=1。break。 case 0xeb:key=2。break。 case 0xe7:key=3。break。 } temp=P1。 beep()。 temp=temp amp。 0x0f。 while(temp!=0x0f) { temp=P1。 temp=temp amp。 0x0f。 } } } P1=0xff。 P1=0xdf。 temp=P1。 temp=temp amp。 0x0f。 if (temp!=0x0f) { 32 Delay_ms(10)。 temp=P1。 temp=temp amp。 0x0f。 if (temp!=0x0f) { temp=P1。 switch(temp) { case 0xde:key=4。break。 case 0xdd:key=5。break。 case 0xdb:key=6。break。 case 0xd7:key=7。break。 } temp=P1。 beep()。 temp=temp amp。 0x0f。 while(
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1