【正文】
,2021 [8] 陳光東 .片微型計(jì)算機(jī)原理接口技術(shù) .武漢:華中理工大學(xué)出版社 ,1999 [9] 張玉蓮 .子 CAD( Protel99SE)實(shí)訓(xùn)指導(dǎo)書(shū) .西安:西安電子科技大學(xué)出版社 ,2021 [10] 王福瑞 .片機(jī)測(cè)控系統(tǒng)大全 .北京:航空航天大學(xué)出版社 ,1998 [11] 林立 .單片機(jī)原理及應(yīng)用 ——基于 Proteus 和 Keil :電子工業(yè)出版社 ,2021 [12] 何衍慶 .制系 統(tǒng)分析設(shè)計(jì)和應(yīng)用 .化學(xué)工業(yè)出版社 ,2021 [13] 楊振江 .A/: 西安電子科技大學(xué)出版社 ,1998 [14] Richard to Electronic Circuit Design. 北京:電子工業(yè)出版社 ,2021 [15] Richard C. Engineering Handbook. CRC Press LLC,2021 石家莊鐵道大學(xué)四方學(xué)院畢業(yè)設(shè)計(jì) 27 致 謝 在本次畢業(yè)設(shè)計(jì)中,我得到了指導(dǎo)老師的熱心指導(dǎo)。Vision2 We discusses the features and advantages of the 8051 microprocessor family and the development tools available from Keil Software. We have designed our development tools to help you quickly and successfully plete your job. For this reason, our tools are easy to use and are guaranteed to help you achieve your design goals. The 8051 has been available since the early 1980’s. With a wide variety of outstanding features and peripherals, the 8051 CPU core is destined to see service well into the next century. More than 200 different 8051 derivatives are available today from a variety of chip vendors. More than half of all embedded projects with a CPU use members of the 8051 embedded processor, the 8051 has no equal. A typical 8051 family member contains the 8051 CPU core, data memory, code memory, and some versatile peripheral functions. A flexible memory interface lets you expand the capabilities of the 8051 using standard peripherals and memory devices. Singlechip microputer as an important branch of a wide range of applications, has developed rapidly. Since the birth of singlechip has been developed into a series of nearly hundreds of models, from the current singlechip solution in the longdistance munication between the various program analysis, RS485 bus munication mode structure because of simple, inexpensive, munications and data transfer rate from the appropriate characteristics have been widely used in instrumentation, intelligent sensors distributed control, building control, alarm monitoring and other fields. System Overview Keil C51 software provides a rich library functions and powerful integrated development and debug tools, the whole Windows interface. Another important point, just look at the piled assembly code generated, you can feel the Keil C51 generated object code efficiency is very high, the majority of the assembly code generated 石家莊鐵道大學(xué)四方學(xué)院畢業(yè)設(shè)計(jì) 29 statement is very pact, easy to understand. In the development of largescale software to better reflect the advantages of highlevel language. The following details the various parts of Keil C51 development system function and use. Keil C51 microcontroller software development system of the overall structure of the The overall structure of C51 kit, uVision and Ishell are C51 for Windows and for Dos integrated development environment (IDE), to plete edit, pile, connection, debugging, simulation and so the whole development process. Developer IDE itself, or other available editor to edit the C or assembler source file. Then C51 and C51 respectively by the piler generates object files piled (. OBJ). Generated object files created by LIB51 library files, together with library files generated by the L51 。幫助解決畢業(yè)設(shè)計(jì)中遇到的許多問(wèn)題。 在本次設(shè)計(jì)中,本人主要負(fù) 責(zé)硬件系統(tǒng)的開(kāi)發(fā)與設(shè)計(jì),仔細(xì)研究了單片機(jī)STC89C5火焰?zhèn)鞲衅鳌?A/D 轉(zhuǎn)換器、鍵盤(pán)以及數(shù)碼管等儀器的電路。本系統(tǒng)選用電源模塊,將 220V 交流電轉(zhuǎn)化為 5V 直流電壓 ,分別給模擬電路和數(shù)字電路供電。就本儀器而言,誤差來(lái)源主要有軟件和硬件兩個(gè)方面。 在調(diào)試過(guò)程中,我們主要是針對(duì) A/D 轉(zhuǎn)換量化進(jìn)行調(diào)節(jié)。初始化完畢之后是對(duì)火焰?zhèn)鞲衅鞯念A(yù)熱,這個(gè)時(shí)間很短。日標(biāo)文件由 LIB51 創(chuàng)建生成庫(kù)文件,也可以與庫(kù)文件一起經(jīng) C51 連接定位生成絕對(duì)目標(biāo)文件 (.ABS)。 石家莊鐵道大學(xué)四方學(xué)院畢業(yè)設(shè)計(jì) 19 第 4 章 火災(zāi)報(bào)警器軟件設(shè)計(jì) STC89 系列單片機(jī)調(diào)試及開(kāi)發(fā)工具 本系統(tǒng)的軟件編 程使用的是美國(guó) Keil software 公司出品的 Keil C51,是 51 系列兼容單片機(jī) C 語(yǔ)言軟件開(kāi)發(fā)系統(tǒng),與匯編相比, C 語(yǔ)言在功能上、結(jié)構(gòu)性、可讀性、可維護(hù)性上更有明顯的優(yōu)勢(shì) [10]。而右側(cè)的數(shù)碼管,是傳感器采集數(shù)據(jù)后,經(jīng) A/D 轉(zhuǎn)換電路把模擬量轉(zhuǎn)換成數(shù)字量之后,由單片機(jī)輸出,顯示在 石家莊鐵道大學(xué)四方學(xué)院畢業(yè)設(shè)計(jì) 18 這個(gè)數(shù)碼管上的。將快速賦能電路用于高速存貯器時(shí) ,譯碼器的延遲時(shí)間和存1腳 3態(tài)允許控制端低電平有效 1D~8D數(shù)據(jù)輸入端 1Q~8Q數(shù)據(jù)輸出端 74HC573 引腳圖 石家莊鐵道大學(xué)四方學(xué)院畢業(yè)設(shè)計(jì) 17 貯器的賦能時(shí)間通常小于存貯器的典型存取時(shí)間 ,這就是說(shuō)由前位的系統(tǒng)譯碼器所引起的有效系統(tǒng)延遲可以忽略 不計(jì)。 74HC138 譯碼器可接受 3 位二進(jìn)制加權(quán)地址輸入( A0, A1 和 A2),并當(dāng)使用時(shí),提供 8 個(gè)互 斥的低電平有效輸出( Y0 至 Y7)。 當(dāng)鎖存使能端 LE 為高時(shí),這些器件的鎖存對(duì)于數(shù)據(jù)是透明的(也就是說(shuō) 輸出同 步)。 圖 35 聲音報(bào)警電路 數(shù)碼管的顯示電路 報(bào)警器強(qiáng)度顯示采用數(shù)碼管?;鹧?zhèn)鞲衅鞑糠钟煽勺冸娮?,保護(hù)電阻,光敏電阻,保護(hù)電容組成。 P2 口( Pin21~ Pin28): 8 位準(zhǔn)雙向 I/O 口線(xiàn),名稱(chēng)為 ~ 。 XTAL2(Pin20):片內(nèi)振蕩電路的輸出端。 上電自動(dòng)復(fù)位是通過(guò)外部復(fù)位電路的電容充電來(lái)實(shí) 現(xiàn)的。除了進(jìn)入系統(tǒng)的正常初始化之外,當(dāng)由于程序運(yùn)行出錯(cuò)或操作錯(cuò)誤使系統(tǒng)處于死鎖狀態(tài)時(shí), 為擺脫困境,也需按復(fù)位鍵重新啟動(dòng)。 石家莊鐵道大學(xué)四方學(xué)院畢業(yè)設(shè)計(jì) 11 如圖 32 所示, RXD 接地, TXD 接外部振蕩器。單片機(jī)總控制電路如下: 1. 時(shí)鐘電路 圖 31 STC89C52簡(jiǎn)圖 STC89C52 內(nèi)部有一個(gè)用于構(gòu)成振蕩器的高增益反相放大器,引腳 RXD 和 TXD分別是此放大器的輸入端和輸出端。 8051 系列單片機(jī)雖然應(yīng)用普遍,工具多,易上手,片源廣,價(jià)格低,但是速度慢,功耗大,適合民用 ,商用,不適合工業(yè)用途。并且也要考慮選擇低價(jià)實(shí)用的機(jī)型。 ( 4)閃光報(bào)警功能 在這款紅外火災(zāi)報(bào)警器中,我們?cè)O(shè)定了一個(gè) LED 燈為光閃爍報(bào)警。 紅外火災(zāi)報(bào)警器的結(jié)構(gòu) 為適應(yīng)家庭和一些公共場(chǎng)所 對(duì)人身以及財(cái)產(chǎn)安全的防護(hù)要求,設(shè)計(jì)的紅外火災(zāi)報(bào)警器應(yīng)不僅能在光亮環(huán)境下起作用,而且應(yīng)具有顯示紅外線(xiàn)強(qiáng)度功能及實(shí)時(shí)控制等功能。與空氣同時(shí)被輸送的可燃性物質(zhì),因高速移動(dòng)中產(chǎn)生靜電造成過(guò)熱等原因會(huì)發(fā)生短時(shí)間內(nèi)閃爍火花。該種檢測(cè)器可以用于室內(nèi)、室外任何防燃、防爆場(chǎng)合。這種傳感器的感受波長(zhǎng) 與熒光燈、