【正文】
t of jitter, usually always use the software delay processing methods Consumers buffeting). Identify specific keys used scanning method: homebyzero level out and check the level of the carriageway of the changes, if a line from the low level into a high, this trip can be sure this column crosspoint Button is pressed.SPCEO61A FLASH memory chip of only 32 K, large number of players in the voice of resources needs of expanding memory. The design Sunplus Technology, Inc., SPR4096 as a memory expansion, bined with SPCE061A broadcast voice. SPR4096 in use, the use of SPR4096 Rewriter to read and write operation, used to store the speaker39。 suspension system to support 1 O interrupt vector And l4 from the system can be a clock, timer / counter, time benchmark generator, external interrupt, key wakeup call, Universal Asynchronous serial munication and software interruption interrupt source, Very suitable for realtime applications。s personality characteristics and parameters Store, a speaker parameters database. In recognition, will be voice recognition and speaker parameters database matching, voice recognition and plete control of the keyboard, and activate or release of locks, the final pletion of the lock. System is relying on hardware and software to closely cooperate with the Sunplus SPCE061A SCM flexible control achieved. Voice entry due to the interference of external environment, it is possible errors, but through a number of training can make parison and identification of voice greatly improved.The system using a single kernel of Sunplus SPCE061A, the chip has ADC, DAC, timer / counter, RAM, FLASH, and other devices, coupled with appropriate external circuit and supporting Sunplus pany39。s living standards improve and strengthen the sense of security, safety locks system bees essential, therefore a password lock, magnetic locks, electronic locks, laser lock, voiceactivated lock locks, etc., they are On the basis of traditional keys, using one or more passwords, different voices, different magnetic field, different sound, different light beams of different images (such as fingerprints, retina, etc.) to control open the lock. In this paper, using speech recognition technology and keyboard to control the importation of the integration of SCM in Sunplus SPCE061A achieve a voice on the electronic certification system password lock.This system is mainly posed of Sunplus SPCE061A SCM, MIC input circuit, voice output circuit, 4 4 keyboard, six Qiduan LED display and output control and FLASH memory ponents. System is the main function: the training, the speaker39。北京:機(jī)械工業(yè)出版社。具體實(shí)現(xiàn)過程如下:,當(dāng)輸入正確。 | 圖 顯示電路 開鎖電路通過單片機(jī)開鎖執(zhí)行機(jī)構(gòu),電路驅(qū)動(dòng)電磁鎖吸合,從而達(dá)到開鎖的目的,當(dāng)用戶輸入的密碼正確時(shí),單片機(jī)便輸出開門信號(hào),送到開鎖驅(qū)動(dòng)電路,然后驅(qū)動(dòng)電磁鎖,達(dá)到開門的目的。同理只有按下關(guān)閉按鍵后顯示器才處于關(guān)閉狀態(tài)。本設(shè)計(jì)的顯示部分由液晶顯示器LCD1602取代普通的數(shù)碼管來完成。根據(jù)高電平出現(xiàn)時(shí)間長短完成不同的提示功能。然后啟動(dòng)程序,進(jìn)行保護(hù),再次在鍵盤上輸入密碼,系統(tǒng)進(jìn)行掃描,如果和之前一樣,則執(zhí)行相同程序,如不是,則執(zhí)行另一種程序。 入口 將數(shù)據(jù)緩存區(qū)取反發(fā)送完8位數(shù)據(jù)?是數(shù)據(jù)0?調(diào)數(shù)據(jù)0的模塊發(fā)射起始位從數(shù)據(jù)緩存區(qū)取一字節(jié)的數(shù)據(jù) 從高位取一位數(shù)Y調(diào)數(shù)據(jù)1的發(fā)射模塊調(diào)數(shù)據(jù)0的發(fā)射模塊N 圖 發(fā)送模塊程序流程圖2) 接收與發(fā)送是一個(gè)逆過程,單片機(jī)外中斷0以中斷方式檢測(cè)紅外信號(hào)的第一個(gè)下降沿。下圖為發(fā)送同步碼和16位地址碼的程序框圖。每次發(fā)送一幀數(shù)據(jù)原理如上文紅外通信原理所述。ABS文件由OH51轉(zhuǎn)換成標(biāo)準(zhǔn)的Hex文件,以供調(diào)試器dScope51或tScope51使用進(jìn)行源代碼級(jí)調(diào)試,也可由仿真器使用直接對(duì)目標(biāo)板進(jìn)行調(diào)試,也可以直接寫入程序存貯器如EPROM中。然后分別由C51及A51編譯器編譯生成目標(biāo)文件(.OBJ)。C51工具包的整體結(jié)構(gòu),其中uVision與Ishell分別是C51 for Windows和for Dos的集成開發(fā)環(huán)境(IDE),可以完成編輯、編譯、連接、調(diào)試、仿真等整個(gè)開發(fā)流程。另外重要的一點(diǎn),只要看一下編譯后生成的匯編代碼,就能體會(huì)到Keil C51生成的目標(biāo)代碼效率非常之高,多數(shù)語句生成的匯編代碼很緊湊,容易理解。用過匯編語言后再使用C來開發(fā),體會(huì)更加深刻。 LCD 1602 圖 LCD 1602如上圖所示:lcd1602完成工作狀態(tài)的顯示。R1的作用在于限制按鍵按下瞬間電容C1的放電電流,避免產(chǎn)生火花,以保護(hù)按鍵觸。當(dāng)電容C1放電結(jié)束后,RST端的電位由R1與R2分壓比決定。增加手動(dòng)復(fù)位按鍵是為了避免死機(jī)時(shí)無法可靠復(fù)位。根據(jù)實(shí)際情況選擇如圖34所示的復(fù)位電路。在復(fù)位期間(即RST為高電平期間),P0口為高組態(tài),P1-P3口輸出高電平;外部程序存儲(chǔ)器讀選通信號(hào)PSEN無效?! ⊥ǔM扑]的初始化過程: 延時(shí)15ms 寫指令38H 延時(shí)5ms 寫指令38H 延時(shí)5ms 寫指令38H 延時(shí)5ms(以上都不檢測(cè)忙信號(hào)) (以下都要檢測(cè)忙信號(hào)) 寫指令38H 寫指令08H 關(guān)閉顯示 寫指令01H 顯示清屏 寫指令06H 光標(biāo)移動(dòng)設(shè)置寫指令0cH 顯示開及光標(biāo)設(shè)置 圖 紅外接收頭示意圖規(guī)格:HX1838(鐵殼)●寬電壓適應(yīng)、低功耗、高靈敏度、優(yōu)良的抗干擾特性;●應(yīng)用廣泛:家用電器、空調(diào)、玩具等紅外遙控接收; 極限參數(shù): 電源電壓VCC (v) 工作溫度TOPR (℃) 25 — +85功 耗PD(mw)35儲(chǔ)存溫度TSTG (℃) 40 —+125 光電參數(shù): (T=25℃ VCC=5V f0=38KHZ) 參 數(shù)符號(hào)測(cè)試條件MinTypeMax單 位 工作電壓 Vcc V 接收距離 LL5IR5 IF =300mA(測(cè)試信號(hào)) 10 17 M 載波頻率 f0 38k HZ 接收角度 θ1/2 距離衰減1/2 +/45 Deg BMP 寬度 fBW 3Db Bandwidth 2 5kHz 靜態(tài)電流 ICC 無信號(hào)輸入時(shí) mA 低電平輸出 VOL Vin=0V Vcc=5V V高電平輸出 VOHVcc=5V Vcc V輸出脈沖 寬 度 TPWL Vin=500μVpp ※ 500 600 700 μS TPWH Vin=50mVpp ※ 500 600 700 μS 復(fù)位電路單片機(jī)復(fù)位是使CPU和系統(tǒng)中的其他功能部件都處在一個(gè)確定的初始狀態(tài),并從這個(gè)狀態(tài)開始工作,例如復(fù)位后PC=0000H,使單片機(jī)從第—個(gè)單元取指令。光標(biāo)加1), N=0(讀或?qū)懸粋€(gè)字符后地址指針減1 amp。設(shè)置162顯示,57點(diǎn)陣,8位數(shù)據(jù)接口; 顯示開關(guān)及光標(biāo)設(shè)置:3 顯示地址1234567891011121314151600H01H02H03H04H05H06H07H08H09H0AH0BH0CH0DH0EH0FH40H41H42H43H44H45H46H47H48H49H4AH4BH4CH4DH4EH4FH 0011 00006EE(或EN)端為使能(enable)端,下降沿使能。4RSRS為寄存器選擇,高電平時(shí)選擇數(shù)據(jù)寄存器、低電平時(shí)選擇指令寄存器。LCD1602 模塊內(nèi)部可以完成顯示掃描,單片機(jī)只要向 LCD1602 發(fā)送命令和顯示內(nèi)容的 ASCII 碼。為了結(jié)束讀操作,主機(jī)必須在第9個(gè)周期時(shí)發(fā)出停止條件或者在第9個(gè)時(shí)鐘周期內(nèi)保持SDA為高電平、然后發(fā)出停止條件。圖4給出的是順序讀的時(shí)序圖。2)寫操作:寫操作分為字節(jié)寫和頁面寫兩種操作,對(duì)于頁面寫根據(jù)芯片的一次裝載的字節(jié)不同有所不同。SDA線上的數(shù)據(jù)狀態(tài)僅在SCL為低電平的期間才能改變,SCL為高電平的期間,SDA狀態(tài)的改變被用來表示起始和停止條件[10]。主器件和從器件都可以工作于接收和發(fā)送狀態(tài)??偩€基本操作:I2C規(guī)程運(yùn)用主/從雙向通訊。帶有I2C接口的單片機(jī)有:CYGNAL的 C8051F0XX系列,PHILIPSP87LPC7XX系列,MICROCHIP的PIC16C6XX系列等。若未收到應(yīng)答信號(hào),由判斷為受控單元出現(xiàn)故障。 應(yīng)答信號(hào):接收數(shù)據(jù)的IC在接收到8bit數(shù)據(jù)后,向發(fā)送數(shù)據(jù)的IC發(fā)出特定的低電平脈沖,表示已收到數(shù)據(jù)。開始信號(hào):SCL為高電平時(shí),SDA由高電平向低電平跳變,開始傳送數(shù)據(jù)。各種被控制電路均并聯(lián)在這條總線上,但就像電話機(jī)一樣只有撥通各自的號(hào)碼才能工作,所以每個(gè)電路和模塊都有唯一的地址,在信息的傳輸過程中,I2C總線上并接的每一模塊電路既是主控器(或被控器),又是發(fā)送器(或接收器),這取決于它所要完成的功能??偩€的構(gòu)成及信號(hào)類型:I2C總線是由數(shù)據(jù)線SDA和時(shí)鐘SCL構(gòu)成的串行總線,