基于MSP430单片机的音乐盒设计

 2023-03-06 09:03

论文总字数:18279字

摘 要

为了实现单片机控制音乐播放,此次毕业设计做出了尝试,即电子音乐盒的设计。本设计采用了蜂鸣器发声来实现歌曲的播放,能保持基本音调不变,流畅播放出歌曲。现选用MSP430单片机。主要设计模块包括数码管显示部分,功能键盘部分,蜂鸣器发声部分。数码管主要显示当前播放的曲目。比如当前播放1,按下切换按键之后变成2。功能键盘部分主要是用来切换播放曲目,以及播放键位,暂停键位。蜂鸣器由输出端口控制,主要是播放曲目。主要功能就是通过按键来控制音乐播放和暂停,以及控制改变播放的曲目。通过蜂鸣器来播放音乐。此次设计要利用MSP430单片机及CCS编程软件编程和电子电工等方面知识。最后制作实物,将程序下载到单片机中,利用I/O产生一定的频率的方波,驱动蜂鸣器,发出不同的音调,从而演奏乐曲。利用MSP430单片机完成的音乐盒,在结构上十分简单,成本较低,且最主要的特点就是低功耗。虽然结构简单,但是功能却很齐全,抛除正常的播放曲目,该音乐盒能够储存较多的曲目以及更换不同的音乐。

关键词:MSP430单片机;音乐盒;蜂鸣器

Design of Music Box Based on MSP 430 Single Chip Microcomputer

Abstract

In order to achieve that the SCM control the music paly, the graduation design made an attempt, that is, the design of electronic music box. The design uses the sound of a buzzer to make the music play, which can maintain the basic tone unchanged and the song played smoothly. Now, choosing the MSP430 microcontroller.The main design module includes a digital tube display part, the function keyboard part, the buzzer sound part. The digital tube display the name of current song. For example, when pressing the switch button, the current song 1 will be turned to 2. The function keyboard part is used to switch the playlist, the playing key, and the suspend key. The buzzer is used to play songs, which is controlled by the output port. The main function of the music box is to control the music play and pause by buttons, as well as to control the change of the playlist. Playing music by buzzer.The design need to use the knowledge of MSP430 microcontroller, CCS programming software programming and electronics. Finally, downloading the program into the microcontroller to make the practical item. Using the I/O to produce square wave of a certain frequency, then drive the buzzer to issued different tones, thus playing music.

The music box ,which is completed with the MSP430 microcontroller, is very simple on the structure and with a low cost. And the most important feature is the low power consumption. Although the structure is simple, the function is very complete, except for the normal playback , the music box can store more tracks and change different music.

Keywords: MSP430 MCU; music box; buzzer

目录

摘要 I

Abstract II

第一章 绪 论 1

第二章 音乐盒总体设计及MSP430简介 2

2.1 设计功能要求 2

2.2基于MSP430单片机音乐盒的优点 2

2.3总体设计原理 3

2.4总体设计框图 3

2.5 MSP430单片机特点及应用 4

2.6MSP430系列单片机 4

2.7MSP430开发板实物图 5

第三章 系统硬件设计 6

3.1 电源电路 6

3.2数码管显示部分 6

3.3键盘部分 6

3.4蜂鸣器部分 7

3.5单片机最小电路 7

3.6硬件部分的总结 8

第四章 系统软件设计 9

4.1软件系统介绍 9

4.2编程语言的选择 9

4.2.1C语言发展史 9

4.2.2C语言的特点 10

4.3应用软件的选择 10

4.4系统程序设计 11

4.5系统软件设计的总结 12

第五章 硬件制作 13

5.1硬件制作的意义 13

5.2硬件制作所需器件 13

5.3硬件制作 13

5.4总结与展望 14

感 谢 15

参考文献 16

附 录 17

第一章 绪 论

随着时代的发展,中国社会的进步日益趋近,这不仅仅显现在社会大环境下,一些简单的产品也能体现出时代的进步,而音乐盒这一小小的物件,也有着巨大的变化。

中国在1992年在宁波自主设计了第一台八音琴,象征着中国在音乐盒方面得到了重大的突破,在这个方面拥有了话语权,在这个领域内在技术上有了全新的突破。八音琴是一种通过机械产生音乐并播放出来的一种机械装置。它源产自于欧洲,在世界上第一台八音琴诞生之后,意味着从此有了记录并播放音乐的装置。而中国这一项自主设计出来的八音琴,标志着中国拥有了能记录播放的音乐装置。

音乐盒的实际意义是什么?有的人为了追求音乐,有的人为了缅怀情感,有的人为了怀念过去,还有的人为了陶冶情操。正因为有了追求,才有了创造,存在即合理。所以在音乐盒上的设计突破是为了满足更多的人去追求他们所需要追求的,实现人类生活品质上的提高。而历史上对音乐盒的创造更新,也是作为历史的镜子来验证历史的进步。

剩余内容已隐藏,请支付后下载全文,论文总字数:18279字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;