【正文】
4 AT89C51 單片機(jī)引腳功能 ................................. 5 脈沖寬度調(diào)制 (PWM)概述 ..................................... 9 2 系統(tǒng)硬件設(shè)計(jì) ................................................. 11 電源電路設(shè)計(jì) ............................................. 11 單片機(jī)時鐘電路設(shè)計(jì) ....................................... 12 單片機(jī)復(fù)位電路設(shè)計(jì) ....................................... 12 看門狗電路設(shè)計(jì) ........................................... 13 按鍵選擇電路設(shè)計(jì) ......................................... 15 顯示模塊電路設(shè)計(jì) ......................................... 16 系統(tǒng)硬件電路設(shè)計(jì) ......................................... 18 3 系統(tǒng)程序設(shè)計(jì) ................................................. 19 主程序的設(shè)計(jì) ............................................. 19 單片機(jī)中斷程序的設(shè)計(jì) ..................................... 20 程序的設(shè)計(jì) ............................................ 21 按鍵程序的設(shè)計(jì) ........................................... 22 顯示系統(tǒng)的程序設(shè)計(jì) ....................................... 24 2 看門狗程序的設(shè)計(jì) ......................................... 26 4 電路系統(tǒng)仿真 ................................................. 27 Proteus 軟件 ............................................. 27 uVision 軟件 ......................................... 28 與 Keil uVision 軟件的聯(lián)調(diào) ......................... 28 仿真電路 ................................................. 28 系統(tǒng)的硬件仿真輸出圖 ..................................... 29 5 本文總結(jié) ..................................................... 31 參考文獻(xiàn) ....................................................... 32 翻譯部分 ....................................................... 33 英文原文 ..................................................... 33 中文譯文 ..................................................... 42 致 謝 ......................................................... 49 中國礦業(yè)大學(xué) 2021 屆本科生畢業(yè)設(shè)計(jì) 1 1 緒論 本文的設(shè)計(jì)背景和意義 單片機(jī)是一種集成在 電路 芯片,是采用 超大規(guī)模集成電路 技術(shù)把具有數(shù)據(jù)處理能力的中央處理器 CPU 隨機(jī)存儲器 RAM、 只讀存儲器 ROM、多種 I/O口和中斷系統(tǒng)、定時器 /計(jì)時器 等功能(可能還包括顯示驅(qū)動電路、 脈寬調(diào)制 電路、模擬多路轉(zhuǎn)換器、 A/D 轉(zhuǎn)換器 等電路)集成到一塊硅片上構(gòu)成的一個小而完善的 計(jì)算機(jī)系統(tǒng) 。 puter simulation。 關(guān)鍵詞: AT89C51 單片機(jī); PWM 信號; 計(jì)算機(jī)仿真; 看門狗程序; II ABSTRACT This paper studies how to use the AT89C51 microcontroller to control the output PWM signal. AT8951 singlechip concept and principle of the PWM signal is discussed in detail, a full analysis of the smallest singlechip system clock circuit and reset with the structure of the internal microcontroller based on the hardware circuit design, including the power to the display, buttons and other peripheral circuit design. By programming the microcontroller output PWM function, the pletion of a software design, including mode selection, timing, key program. Subject to interference from external electromagic field, in order to prevent the work of the microcontroller, causing the program to run to fly into the phenomenon of infinite loop in the design done on the basis of the watchdog circuit, the microcontroller to stabilize the output of the PWM waveform. This design also Proteus and Keil uVision, software related presentations by Proteus and the Keil uVision software, the FBI in the Keil uVision programming, simulation in Proteus software on the microcontroller output PWM system. The ultimate realization of the following features: K1 key to select the PWM waveform output on and off, through the key K2, K3, with the change to the switch SW1 on the regulatory role of the PWM waveform cycle and duty cycle parameters. Finally, the simulation in Proteus software simulation output of the PWM waveform, duty cycle and the cycle of the PWM waveform and PWM waveform output time displayed by the display module, and ultimately the successful pletion of the design. Keywords: AT89C51 microcontroller。最終實(shí)現(xiàn)了以下功能:能夠通過 K1 鍵選擇PWM 波形的輸出與關(guān)閉,通過按鍵 K K3 與換向開關(guān) SW1 實(shí)現(xiàn)對 PWM波形周期和占空比參數(shù)的調(diào)節(jié)作用。為了防止 單片機(jī)的工作受到來自外界電磁場的干擾,造成程序的跑飛而陷入死循環(huán) 的現(xiàn)象,在完成以上設(shè)計(jì)的基礎(chǔ)上加入了看門狗電路,使得單片機(jī)能夠穩(wěn)定地輸出 PWM 波形。在對單片機(jī)內(nèi)部結(jié)構(gòu)熟悉的基礎(chǔ)上完成了硬件電路設(shè)計(jì),主要 包括電源、顯示、按鍵等外圍電路設(shè)計(jì)。 本人簽名: 日期: 中國礦業(yè)大學(xué) 畢 業(yè)論文指導(dǎo)教師評閱書 指導(dǎo)教師評語 (①基礎(chǔ)理論及基本技能的掌握;②獨(dú)立解決實(shí)際問題的能力;③研究內(nèi)容的理論依據(jù)和技術(shù)方法;④取得的主要成果及創(chuàng)新點(diǎn);⑤ 工作態(tài)度 及工作量;⑥總體評價及建議成績;⑦存在問題;⑧是否同意答辯等): 成 績: 指導(dǎo)教師簽字: 年 月 日 中國礦業(yè)大學(xué) 畢業(yè)論文評閱教師評閱書 評閱教師評語 ( ①選題的 意義;②基礎(chǔ)理論及基本技能的掌握;③綜合運(yùn)用所學(xué)知識解決實(shí)際問題的能力;④工作量的大?。虎萑〉玫闹饕晒皠?chuàng)新點(diǎn);⑥寫作的規(guī)范程度;⑦總體評價及建議成績; ⑧ 存在問題;⑨是否同意答辯等 ): 成 績: 評閱教師簽字: 年 月 日 中國礦業(yè)大學(xué) 畢業(yè)論文答辯及綜合成績 答 辯 情 況 提 出 問 題 回 答 問 題 正 確 基本 正確 有一般性錯誤 有原則性錯誤 沒有 回答 答辯委員會評語及建議成績: 答辯委員會主任簽字: 年 月 日 學(xué)院領(lǐng)導(dǎo)小組綜合評定成績: 學(xué)院領(lǐng)導(dǎo)小組負(fù)責(zé)人: 年 月 日 I 摘 要 本文研究了如何 利用 AT89C51 單片機(jī)控制輸出 PWM 信號。本論文屬于原創(chuàng)。盡我所知,除文中已經(jīng)注明引用的內(nèi)容外,本畢業(yè)論文的研究成果不包含他人享有著作權(quán)的內(nèi)容。 中國礦業(yè)大學(xué) 本科生畢業(yè)論文 專 業(yè): 自 動 化 論文題目: 基于單片機(jī)的 PWM 信號輸出系統(tǒng)設(shè)計(jì) 中國礦業(yè)大學(xué)畢業(yè)論文任務(wù)書 任 務(wù) 下 達(dá) 日 期 : ** 畢業(yè)論文日期: ** 畢業(yè)論文題目: 基于單片機(jī)的 PWM 信號輸出系統(tǒng)設(shè)計(jì) 畢業(yè)論文專題題目: 畢業(yè)論文主要內(nèi)容和要求: 整體方案設(shè)計(jì) 硬件電路設(shè)計(jì),包括電源、顯示、按鍵等外圍電路設(shè)計(jì) 軟件設(shè)計(jì),包括模式選擇程序、時間選擇程序、顯示程序、按鍵程序等 應(yīng)用 PROTEUS 軟件進(jìn)行仿真 指導(dǎo)教師簽字: 鄭 重 聲 明 本人所呈交的畢業(yè)論文,是在導(dǎo)師的指導(dǎo)下,獨(dú)立進(jìn)行研究所取得的成果。所有數(shù)據(jù)、圖片資料真實(shí)可靠。對本論文所涉及的研究工作做出貢獻(xiàn)的其他個人和集體,均已在文中以明確的方式標(biāo)明。本畢業(yè)論文的知識產(chǎn)權(quán)歸屬于培養(yǎng)單位。文中對AT8951 單片機(jī)概念和 PWM 信號的原理做了詳細(xì)的論述,對單片機(jī)最小系統(tǒng)中的時鐘電路和復(fù)位電路進(jìn)行了充分的分析。并通過編程實(shí)現(xiàn)了單片機(jī)輸出 PWM 功能,完成了軟件設(shè)計(jì),包括模式選擇、時間選擇、顯示、按鍵程序等。 本設(shè)計(jì) 還對 Proteus 和 Keil uVision 軟件做了相關(guān)介紹,通過 Proteus 和Keil uVision 軟件的聯(lián)調(diào)在 Keil uVision 中編寫程序,在