【正文】
本科畢業(yè)論文(設計) 題 目 : 基于 51 單片機的自動音樂播放器 設計 院 系: 電子與通信工程學院 專 業(yè): 通信工程 姓 名: 張志順 學 號: 101118401042 指導教師: 陳冬云 教師職稱: 助教 填寫日期: 2020 年 4 月 20 日 貴陽學院本科畢業(yè)論文(設計) 摘 要 為了人們在快節(jié)奏的日常生活 ,優(yōu)化 工廠、事業(yè)單位、公司 等的計時系統(tǒng) ,采用 了依靠 單片機為基礎設計了一種的自動音樂播放器。本設計利用單片機89C58RD+的 計數(shù) 和 定時 功能,來完成 對 時間的 定時 和 顯示 功能。并且,通過對定時器初值的設定來產(chǎn)生不同頻率的聲音,利用定時器中斷來對音樂節(jié)拍長度的控制。通過 LM386N1 音頻功率放大器 的音頻放大功能 ,將單片機 控制 輸出的信號放大, 然后 通過 擴音器 播放樂曲。通過 MAX232 型芯片,可以轉(zhuǎn)換 PC機上的電壓和單片機的電源電壓,再通過 相應 串口接入 PC 機,這樣就能從 PC 機上將用 C語言編寫的程序 代碼 下載到單片機上。最后可 以 在數(shù)碼管上顯示時間,當 到達之前設定的時間之后 , 擴音系統(tǒng)就會 自動播放一段連續(xù) 而美妙動聽 的音樂。此設計 規(guī)避了 傳統(tǒng)鬧鐘的 難聽并且 刺耳聲音, 而變成 的是美妙 動聽 的音樂,能 給處于當前快節(jié)奏生活的 人們的日常生活提供 精確 的計時,且 因為成本較低 ,值得推廣。 關鍵詞 :單片 機;自動音樂播放;音頻轉(zhuǎn)換;時間顯示; LM386N1 音頻功率放大器。 貴陽學院本科畢業(yè)論文(設計) Abstract To people in the fast pace of daily life, optimization of factories, institutions, panies such as timing system, based on microputer was adopted to design a kind of automatic music player. This design using the single chip microputer 89 c58rd + count and timing functions, to plete the regular and display function of time. And, through to the setting of the initial value of timer to generate different frequencies of sound, using a timer interrupt to control of the beat of the music length. Through the audio amplifier function LM386N1 audio power amplifier, the singlechip microputer control output signal amplification, and then through loudspeakers. Through MAX232 chip, can convert the voltage of power supply voltage of PC and microcontroller, again through the corresponding access PC serial port, so you can from the PC to download program code written in C language to the single chip microputer. Last time can be displayed on the digital tube, when, after arriving in setting the time before the public address system will automatically play a continuous and delightful music. This design to avoid the traditional alarm clock ugly and harsh voice, and bee the beautiful melody of music, can give in the fastpaced life of the People39。s Daily life to provide accurate timing, and because of lower cost, is worth promoting. Key words: single chip microputer。 Automatic music playback。 Audio conversion。 Time display。 LM386N1 audio power amplifier. 貴陽學院本科畢業(yè)論文(設計) IV 目錄 第一章 緒論 .........................................................1 第二章 系統(tǒng)硬件的設計 ...............................................2 設計目的 .....................................................2 硬件電路結(jié)構 .................................................2 89C51 單片機芯片介紹 ............................