【正文】
application of the microcontroller is constantly deepening, while driven by the traditional control to detect the rapid update. In realtime detection and automatic control of microputer application system, the microcontroller is often a core ponent to use only SCM knowledge is not enough, according to the specific hardware architecture, and software bination for a specific application object features should also be improved. Today to use microcontroller to control the music player and more too numerous to cite, quite as much as music chip, while the use of a microcontroller for storing music, control playback of the most extensive. It has a function, excellent prices, external circuit is simple, and very popular with music lovers and music chip maker Green ignorant. This article, using a single chip and a few peripheral circuits to control music playback. The design is based on AT89C51 microcontroller as the core data processor, track number by LCD LCD display LM016L, display song, playback time, the boot screen and keypad No. 4 * 4 determinant keyboard track number selection, one of them ~ A number keys to select the track number, the C key to control under a D key control on an E keys to control play / pause, the F key to startup screen display, and ponents to the low power, highenergy, durability, precision, easy operation for priority consideration. Mining when a keyboard key is pressed to determine the key, to start the counter T0, resulting in a certain frequency pulse drive the buzzer and release music. Start timer T1, play time. AT89C51 microcontroller memory is smaller, with a 74LS373 latch and 27512 external expansion chip, the microcontroller memory expansion, increasing its storage space, so that he can store enough songs. Importantly, the microcontrollerbased music player to solve the dedicated music players chips can only be a onetime burn, play immutable shortings. The music generator paper introduces the hardware structure and design method, the whole design is simple, practical and fully functional. Keywords: music。 on AT89C51。 microcontroller。 the LCD LM016L. I 目 錄 1 緒論 ................................................................ 1 課題意義 .................................................. 1 主要研究工作 ............................................. 2 2 設(shè)計(jì)方案 ........................................................... 2 設(shè)計(jì)方案論證 ............................................. 2 方案一 .................................................. 2 方案二 .................................................. 3 方案三 .................................................. 4 方案比較 ................................................ 5 主要設(shè)計(jì)軟件介紹 .......................................... 6 PROTEUS 軟件簡(jiǎn)介 ..................................................................... 6 KEIL 軟件簡(jiǎn)介 ............................................................................... 6 3 硬件設(shè)計(jì) ........................................................... 7 電路組成及工作原理 ....................................... 7 電路組成 ................................................ 7 電路工作原理 ............................................ 7 AT89C51 的簡(jiǎn)介 ............................................ 7 AT89C51 功能概述 ....................................... 7 AT89C51 的管腳圖 ....................................... 8 AT89C51 單片機(jī)的引腳介紹 ............................... 9 晶振電路 ................................................ 10 II 揚(yáng)聲器電路 .............................................. 10 顯示電路 ................................................ 10 更換歌曲電路 ............................................ 11 復(fù)位電路 ................................................ 12 程序存儲(chǔ)器外部擴(kuò)展電路 .................................. 12 4 液晶顯示原理及 LM016L 簡(jiǎn)介 ................................... 13 液晶顯示原理及分類 ..................................... 13 液晶顯示原理 ........................................... 13 液晶顯示器的分類 ....................................... 13 液晶顯示器各種圖形的顯示原理 : ........................... 13 LCD1602 簡(jiǎn)介 ............................................ 14 5 穩(wěn)壓電源 ....................................................... 16 穩(wěn)壓電源的功能 .......................................... 16 直流 穩(wěn)壓電源 ............................................ 17 220 v 交流電轉(zhuǎn)5 v 直流電的電源設(shè)計(jì) ..................... 17 電路工作原理 ........................................... 17 電路原理圖 ............................................. 18 6 軟件系統(tǒng)設(shè)計(jì) ..................................................... 19 播放音樂(lè)的原理 ........................................... 19 音符頻率的產(chǎn)生 ........................................... 19 節(jié)拍頻率的產(chǎn)生 ........................................... 21 軟件流程設(shè)計(jì) ............................................ 22 III 性能分析 ................................................. 23 參考文獻(xiàn) ............................................... 27 附 錄 .................................................. 28 外文翻譯 中文翻譯 致 謝 武漢紡 織大學(xué) 2021 屆畢業(yè)設(shè)計(jì)(論文) 1 1 緒論 課題意義 音樂(lè)盒的起源,可追溯至中世紀(jì)歐洲文藝復(fù)興時(shí)期。當(dāng)時(shí)為使教會(huì)的鐘塔報(bào)時(shí), 而將大小的鐘表裝上機(jī)械裝置,被稱為 “可發(fā)出聲音的組鐘 ”。音樂(lè)盒有著 300 多 年的發(fā)展歷史,是人類文明發(fā)展的歷史見(jiàn)證。 傳統(tǒng)的音樂(lè)盒多是機(jī)械音樂(lè)盒,其工作原理是通過(guò)齒輪帶動(dòng)一個(gè)帶有鐵釘?shù)蔫F 桶轉(zhuǎn)動(dòng) ,鐵桶上的鐵釘撞擊鐵片制成的琴鍵,從而發(fā)出聲音。但是,機(jī)械式的音樂(lè) 盒體積比較大,比較笨重,且發(fā)音單調(diào)。水、灰 塵等外在因素,容易使內(nèi)部金屬發(fā) 音條變形,從而造成發(fā)音跑調(diào)。另外,機(jī)械音樂(lè)盒放音時(shí)為了讓音色穩(wěn)定 ,必須放 平不能動(dòng)搖,而且價(jià)格昂貴,不能實(shí)現(xiàn)大批量生產(chǎn)。 本文設(shè)計(jì)的音樂(lè)盒,是基于單片機(jī)設(shè)計(jì)制作的電子式音樂(lè)盒。與傳統(tǒng)的機(jī)械式 音樂(lè)盒相比更小巧,音質(zhì)更優(yōu)美且能演奏和弦音樂(lè)。電子式音樂(lè)盒動(dòng)力來(lái)源是電池, 制作工藝簡(jiǎn)單,可進(jìn)行批量生產(chǎn),所以價(jià)格便宜?;趩纹瑱C(jī)制作的電子式音樂(lè)盒, 控制功能強(qiáng)大,可根據(jù)需要