【正文】
摘 要隨著科學(xué)技術(shù)的不斷發(fā)展,單片機的應(yīng)用日益成熟。單片機集成度高、處理功能強大、價格低廉使其在各個領(lǐng)域得到廣泛應(yīng)用。同時電子琴作科 學(xué) 技 術(shù) 與 音 樂 共 同發(fā) 展 的 產(chǎn) 物 , 在 這 個 電 子 信 息 化 的 時 代 , 為 音 樂 的 大 眾 化 做 出 了 不 可 代 替 的 貢 獻(xiàn) 。本 文 主 要 介 紹 一 種 基 于 51 單 片 機 的 簡 易 電 子 琴 設(shè) 計 方 案 。 它 采 用 了 STC 公司 出 品 的 一 款 低 功 耗 、 高 性 能 單 片 機 STC89C52 芯 片 作 為 主 控 單 元 , 與 4*4 矩陣鍵盤、復(fù)位電路、LED 雙位數(shù)碼顯示器、揚聲器等組成主控核心模塊。文 章 詳 細(xì) 論述 了 電 子 琴 硬 件 設(shè) 計 和 軟 件 結(jié) 構(gòu) 設(shè) 計 流 程 , 采 用 了 Altium Designer 09 畫出原理圖、PCB 圖,通過 Keil 編程軟件對電子琴進(jìn)行軟件編程,然后進(jìn)行軟硬件的調(diào)試運行并將程序燒錄到 STC89C52 芯片中。此系統(tǒng)運行比較穩(wěn)定,具有硬件設(shè)計電路簡單、清晰,成本低,軟件功能完善,控制系統(tǒng)牢靠,性價比高等優(yōu)點,具有一定的實用和參考價值。關(guān)鍵詞:STC89C52;電子琴;矩陣鍵盤AbstractAlong with the development of science and technology, the application of SCM increasingly mature. Single chip microputer high level of integration, processing powerful, low prices make it is widely used in various fields. At the same time the keyboards for science and technology and music mon development of the product, in the electronic information era, for music39。s popular do can39。t replace contribution. This paper mainly introduces a kind of simple keyboard based on 51 SCM design scheme. It uses the STC product of our pany a low power consumption, high performance microprocessor STC89C52 chips as the master unit, and 4 * 4 matrix keyboard and reset circuit, LED digital display, a double master core module and other ponents of the speaker. This paper discusses the design of hardware and software structure keyboard design process, the use of a Altium Designer 09 draw a diagram, PCB figure, through the Keil software keyboard to software programming, then the software and hardware debugging run and will burn to STC89C52 chip program. Operation of the system is stable and has the hardware circuit design simple, clear, and the cost is low, the software perfect function, control system firm, price higher advantages, has certain practical and reference value. Key words : stc89c52。 keyboard。 matrix keyboard目錄摘要 ..........................................................................................................................................IAbstract ...................................................................................................................................II1 緒論 ......................................................................................................................................1 設(shè)計的目的和意義 .......................................................................................................1 設(shè)計的主要內(nèi)容 ...........................................................................................................12 系統(tǒng)概述 ..............................................................................................................................1 系統(tǒng)工作原理 ...............................................................................................................1 系統(tǒng)結(jié)構(gòu)組成 ...............................................................................................................1 電源電路 ................................................................................................................2 控制部分 ................................................................................................................2 顯示部分 ................................................................................................................2 發(fā)聲部分 ................................................................................................................2 主要芯片及元件的介紹 ...............................................................................................2 STC89C52 單片機簡介 ..........................................................................................2 芯片引腳介紹 ........................................................................................................4 STC89C52 時鐘介紹 ..............................................................................................7 雙位 LED 數(shù)碼顯示器簡介 ..................................................................................73 硬件電路的設(shè)計 ..................................................................................................................9 電源電路的設(shè)計 ...........................................................................................................9 復(fù)位電路的設(shè)計 .........................................................................................................10 復(fù)位操作 ................................