0 基于 MSP430控制蜂 鸣器演奏 乐曲的设计指导老师:队员:学校:延安大学院系:物理与电子信息学院1 摘要 : 本作品为了实现蜂鸣器演奏音乐,设计基于单片机MSP430,以高低电平控制音调, 电流通过蜂鸣器的电磁线圈,从而带动振动膜发声为方案, 达到演奏美妙音乐的目的。 技术报告以蜂鸣器演奏音乐的设计为主线,包括蜂鸣器演奏音乐的的框架设计,软硬件设计,以及对灯光随高低电平闪烁的研究等。基于可靠的硬件设计和稳定的软件算法,实现题目要求。矚慫润厲钐瘗睞枥庑赖。关键词 :单片机 MSP430 高低电平蜂鸣器Abstract:This work in order to achieve a buzzer play music, design based on the single chip microcomputer MSP430, with high and low level control tones, the current through the buzzer electromagnetic coils, thus promote vibration membrane voice for plan to meet wonderful music playing the purpose. Technical report to play music of the design of the buzzer main line, including playing music of the framework of the buzzer design, software and hardware design, and with high and low level of lights flashing. Based on reliable hardware design and stable software algorithm, and realize the topic request.聞創沟燴鐺險爱氇谴净。Keywords: MSP430 microcontroller High and low level buzzer残骛楼2 諍锩瀨濟溆塹籟。一、设计要求(1)基于单片机 MSP430 为主控芯片,利用蜂鸣器发声,以高低电平控制音调,来实现演奏乐曲的功能。(2)准备八个发光二级管,定义MSP430 单片机的八个管脚分别为歌曲中的不同音符这样,每当蜂鸣器演奏一个音符时,相应的LED 就会发光,随着闪烁。酽锕极額閉镇桧猪訣锥。二、硬件设计(1)整体方案通过改编 430 程序使其能够发出相应的音乐。演奏乐曲,对于一个音符应该包括两个部分,一是声调,二是持续时间,在这个程序中声调是由简单的延时 —— 电平翻转来实现, 改变了延时时间就改变了声调,而时间是通过计数比较来实现,当计数值相等时就跳出循环演奏下一个音。彈贸摄尔霁毙攬砖卤庑。(2)系统框架图(一)(3)主控芯片的选择MSP430 系列单片机是一个16 位的单片机,采用了精简指令集( RISC)结构,具有丰富的寻...