基于AT89C51和弦音乐播放器设计

合集下载

基于AT89C51型单片机的号音自动播放器的开题报告

基于AT89C51型单片机的号音自动播放器的开题报告

基于AT89C51型单片机的号音自动播放器的开题报告一、课题背景和意义随着科学技术的快速发展和人民生活水平的不断提高,我们生活中的各式各样的电子产品也在被每时每刻地更新换代着。

每当我们乘坐火车进行长途旅行时,每当我们在操场上锻炼身体时,每当我们在大街上闲逛时,每当我们在校园里练习听力时,随身听都是我们不可分离的好伙伴。

便携式音乐播放器(随身听)最大的贡献就是改变了人们欣赏音乐的方式,使人类可以随时随地地欣赏音乐,进而使自由享受音乐变成了一种时尚的个人体验进而形成了一种随身听文化。

便携式音乐播放器的个人保有量在各种数码产品中也是位列前茅,从最早的磁带机,到后来的CD机,再到现在大行其道的MD机、MP3播放器,再到已初露峥嵘的硬盘播放器,便携式音乐播放器陪伴着我们度过了无数美好的时光。

然而在这满天飞的播放器中有一种播放器却被我们时常用着,虽然我们看不到却能听到它的存在,它也是陪伴我们一起成长的一个伙伴,它就是号音自动播放器。

在机关、院校的日常作息中需要计时和号音来提示人们,采用人工操作不仅效果差,而且容易出错,采用单片机设计的号音自动播放器摆脱了传统闹钟的刺耳声音,取而代之的是美妙的音乐,能为人们的日常生活提供准确的计时,且成本低廉,值得推广。

二、课题任务的主要内容利用AT89C51型单片机和LM386型音频功率放大器设计自动计时号音播放器。

本系统主要完成作息定时和号音播放功能,因此用定时器T1中断方式产生100ms基准时间,再根据作息表上各段时间的长短对基准时间用软件计时。

可以用查表方式取得计数参数,计时到后将播放子程序地址送DPTR,转入播放子程序,放2遍对应号音后再继续计时。

三、已具备条件应用电子技术专业的毕业生已完成电子线路、数字电路基础、单片机原理、单片机应用系统设计等课程的学习,并通过实践课的教学达到相应的电路设计、软件编程等能力目标。

四、设计思路与方案该号音自动播放系统中主要有AT89C51、LM3861N1、扬声器、数码管显示组成。

基于89C51的数字音乐盒的设计

基于89C51的数字音乐盒的设计

单片机系统课程设计成绩评定表设计课题:基于89C51的数字音乐盒的设计学院名称:电气工程学院专业班级:自动1102学生姓名:袁超杰学号: 201123910302 指导教师:王黎设计地点:31-630设计时间:2013-12-16~2013-12-27单片机系统课程设计课程设计名称:基于89C51的数字音乐盒的设计专业班级:自动1102学生姓名:袁超杰学号:201123910302 指导教师:王黎课程设计地点:31-630课程设计时间:2013-12-16~2013-12-27单片机系统课程设计任务书目录1绪论 (1)1.1数字音乐盒概述 (1)1.2设计思想及基本功能 (1)2总体方案设计 (2)2.1方案设计 (2)2.2 方案比较 (3)2.3方案选取 (3)3 硬件电路设计 (3)3.1 直流稳压电源电路设计 (3)3.2 单片机最小系统设计 (4)3.3 蜂鸣器电路 (5)3.4 键盘控制电路 (5)4 系统软件设计 (6)4.1 主程序软件设计 (6)4.2 中断服务程序设计 (7)5总结 (7)参考文献: (9)附录 (10)附录一系统原理图 (10)附录二系统调试 (11)附录三程序代码 (12)附录四机器码 (17)1绪论1.1数字音乐盒概述数字音乐盒是现代电子科技与音乐结合的产物,是一种新型的播放乐器。

因为单片机具有强大的控制功能和灵活的编程实现特性,数字音乐盒已经溶入现代人们的生活中,成为不可替代的一部分。

本文的主要内容是用AT89S51单片机为核心控制元件,设计一个数字音乐盒。

该音乐盒主要由按键电路、单片机最小系统、以及蜂鸣器电路组成,使用3个按键控制音乐盒。

本系统运行稳定,其优点是硬件电路简单,软件功能完善,控制系统可靠等,具有一定的实用和参考价值。

1.2设计思想及基本功能该系统具有一般音乐盒的最基本功能,即通过蜂鸣器播放音乐曲目,通过键盘电路控制歌曲的播放。

在选取设计方案和采取元器件方面,该系统本着简单实用经济的思想,尽量简化电路设计,用最简单的电路布线和选用最经济实用的器件来达到设计要求。

基于AT89C5单片机的电子音乐盒设计课程设计9869728

基于AT89C5单片机的电子音乐盒设计课程设计9869728

课程设计任务书工学院机械系机械设计制造及其自动化专业11 级机电三班题目: 基于AT89C51单片机的电子音乐盒设计课程:单片机应用技术课程设计课程设计时间 2014年10月27 日至2014年11 月10 日共2 周课程设计工作内容与基本要求(设计要求、设计任务、工作计划、所需相关资料)(纸张不够可加页)1.设计要求利用AT89C51单片机作为微控制器,用16盏以上的LED小灯,实现至少4种彩灯灯光效果(不含全部点亮,全部熄灭);可以用输入按钮在几种灯光效果间切换;可以通过按钮暂停彩灯效果,使小灯全亮,再次按下相同按钮后继续之前的效果。

创新设计:2. 设计任务与要求2.1系统硬件电路设计根据该系统设计的功能要求选择所用元器件,设计硬件电路。

要求用Proteus绘制整个系统电路原理图。

2.2软件设计根据该系统要求的功能进行软件设计,绘制整个系统的软件流程图;根据流程图编写程序并汇编调试通过;列出软件清单,软件清单要求逐条加以注释。

2.3 Proteus仿真用Proteus对系统软硬件进行仿真调试并通过。

2.4 编写设计说明书内容包括任务书、设计方案分析、硬件部分设计、软件部分设计、调试结果整理分析、设计调试的心得体会等,字数不少于5000字;硬件部分设计要绘制整个系统电路原理图,对各部分电路设计原理做出说明;软件设计部分要(用visio2003画图软件)绘制整个系统及各部分的软件流程图,列出程序清单,逐条加以注释,并注明各程序功能块的功能。

3.工作计划4.主要参考资料单片机课程设计指导书皮大能北京理工大学出版社 2012.7 8051单片机实践与应用吴金戎清华大学出版社2003.8单片机技术基础教程与实践夏路易电子工业出版社2008.1单片机原理及应用张毅刚高等教育出版社 2012.11基于Proteus的单片机系统设计与仿真实例蒋辉平机械工业出版社2007.7…指导老师签字:日期:摘要为了实现单片机控制音乐播放,在本次课程设计中尝试基于单片机AT89C51音乐盒的设计对这一思路进行验证。

Get清风毕业论文基于AT89C51单片机的音乐播放器的设计

Get清风毕业论文基于AT89C51单片机的音乐播放器的设计

毕业论文-基于AT89C51单片机的音乐播放器的设计兰州工业学院毕业设计〔论文〕题目基于单片机的音乐播放器的设计学院电子信息工程学院专业电子信息工程技术班级嵌入式1 1姓名张文琪学号202110103125指导教师〔职称〕兰聪花〔讲师〕日期2021年3月兰州工业学院毕业设计〔论文〕任务书电子信息工程学院2021届电子信息工程专业毕业设计〔论文〕任务书毕业设计〔论文〕题目基于单片机的音乐播放器的设计课题内容性质软、硬件开发课题来源性质教师收集的结合生产实际的课题设计/论文校内〔外〕指导教师职称工作单位及部门联系方式兰聪花讲师电子信息工程学院一、题目说明〔目的和意义〕:本设计希望通过对常见电子产品的设计与制作来培养学生综合运用所学知识,分析和解决实际问题的能力,掌握相关绘图制作软件,会运用电子仪器进行电路检测和调试,强化电子技术应用技能训练,为今后开展产品技术开发、设计和制作打下初步的根底。

该系统设计,涉及到电路技术、单片机原理、Protel电路设计原理、程序设计、单片机程序烧录和焊接电路等方面知识,考察了学生对以往学习过的课程的综合应用能力。

二、设计〔论文〕要求〔工作量、内容〕:【设计内容】根据音乐演奏控制器所要实现的显示与选曲及音乐产生功能原理,系统包括演奏扬声器、选曲、播放和显示几局部。

通过按键控制,系统具有开启、暂停播放当前曲子的功能;播放前一首、后一首歌曲的功能;控制播放器的播放模式:顺序播放、随机播放、重复单曲、全部重复等功能。

未播放时放光二极管产生流水灯,播放音乐时能随着曲调闪烁。

所设计的音乐播放器可以播放多首音乐,曲目选择可以由键盘控制,并通过显示器显示歌曲序号。

【设计环境】软件:keil 软件,AVR_fighter烧写软件,Protel99se绘图软件,Protues仿真软件。

硬件:微机,常用电子元件,实验室常用电子检测仪器。

【设计要求】〔1〕完成系统总体设计,硬件设计和软件设计等。

基于AT89C51音乐播放器

基于AT89C51音乐播放器

单片机原理及系统课程设计专业:自动控制班级:1103班姓名:徐越学号:2指导教师:李亚宁兰州交通大学自动化与电气工程学院2013 年 9月 1 日基于单片机的音乐播放器设计摘要随着我国现代化技术建设的发展,电子产品多种多样,但同类电子产品工作原理基本相同,只不过在硬件电路的是实现上有所不同。

例如我们我们平时所用的MP3音乐播放器,就可以用单片机和一些电子元件来实现它的基本功能。

我的设计是以89C51单片机作为核心工作元件的音乐播放器,依据单片机技术原理,通过硬件电路制作以及软件编译,设计制作出一个多功能音乐盒。

该音乐盒主要由按键电路、复位电路、时钟电路以及蜂鸣器组成。

本设计利用KEIL编程软件对音乐盒源程序进行编程并调试,配合PROTEUS仿真软件对硬件进行仿真调试,节约了设计时间。

它在实现音乐播放功能上简单易行,在制作硬件电路上也不困难。

因此,此次课程设计,我除了完成了系统的软件设计和实物电路仿真外,利用空余时间制作出了实物。

关键字音乐播放器,AT89C51单片机,KEIL,PROTEUS。

1 引言1.1 设计目的此次制作的音乐播放器,只需将音乐编码导入C语言程序,经过KEIL软件运行生成HEX文件,经BDM下载器导入单片机中即可。

可以同时生成多首歌曲的音乐编码,再次我选择了两首歌的音乐编码。

学生自己动手就可以制作属于自己的个性化的音乐播放器,通过自己动手将所学的单片机知识应用到实践中。

1.2 设计要求设计一个基于AT89C51的音乐播放器,利用软件编程和相应的硬件电路实现不同歌曲的播放,先利用KEIL软件编程,再用PROTEUS仿真实现,生成可执行的HEX文件,最后焊接实物电路。

1.3 设计方法采用AT89C51单片机、蜂鸣器,晶体振荡器,晶体管2N2905,复位开关为主要硬件。

PROTEUS仿真软件设计和C语言编程方法实现播放器的模拟,用AT89C51实现音乐编码的处理,用晶体管2N2905对电路中电流放大,进而驱动蜂鸣器播放音乐。

基于89C51的数字音乐盒设计方案

基于89C51的数字音乐盒设计方案

基于89C51的数字音乐盒设计方案1 概述本音乐盒的设计是以AT89C52芯片的电路为基础,外部以蜂鸣器作为发音器件,共同组成了音乐演奏控制器的硬件电路,通过软件程序来控制单片机部的定时器使单片机I/O口发出相应频率的脉冲来驱动蜂鸣器发出某个音调,与之相对应的LED亮起,从而演奏出优美动听的音乐。

利用按键切换演奏出不同的乐曲,并可以在LCD上显示当前曲目序号和时间。

用户可以按照自己的喜好选择音乐并将其转化成机器码存入单片机的存储器中。

对于不同型号的单片机只需要相应的改变一下地址和I/O管脚即可。

该软、硬件系统具有很好的通用性,很高的实际使用价值,为单片机DIY制作者和音乐爱好者具有一定的借鉴作用。

2 系统总体方案设计2.1硬件组成按照数字是音乐盒对控制系统的技术要求,控制系统的硬件应包括以下几部分:(1)控制器。

作为控制系统的核心,可以采用主流的51单片机,MSP430,或处理性能更为优越的ARM来合理控制各个器件有条不紊的运行。

(2)乐曲选择器。

可以采用按键或者触摸屏来切换相应的曲目。

(3)音频输出器件。

做为音乐盒的发声设备,可以用蜂鸣器通过它可以将音乐代码转变为音频信号发出来。

(4)人机交互界面。

可以运用LED或LCD在歌曲播放过程中用来对歌曲信息进行监控显示,反馈给使用者相应的信息。

硬件方框图图2-1-12.2.方案论证。

本次设计以低成本,灵活方便为原则,所以控制器选用主流的51系列单片机,考虑到51部储存空间的限制,故选用容量为51两倍的AT89C52单片机作为总控制器,共有以下两套方案可供选择:方案一:以AT89C52单片机作为总控制器,以机械键盘作为乐曲选择器,以蜂鸣器作为音频输出设备,以LCD1602液晶作为人机交互界面。

方案二:以AT89C52单片机作为总控制器,以机械键盘作为乐曲选择器,以蜂鸣器作为音频输出设备,以LED数码管作为人机交互界面。

由于数码管显示容的单一,操作较为繁琐且难以满足大众对主流时尚的需要,所以选用较为流行的显示效果良好的1620液晶作为人机交互界面,最终确定方案一作为制作方案。

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

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

图2 蜂鸣器电路控制电路图4 仿真调试6.2性能分析用AT89C51单片机的I/O口产生一定频率的方波,驱动蜂鸣器,出不同的音调,从而演奏乐曲。

共有4支乐曲,每首乐曲都由相应的按键控制,并且有开关键、暂停键、上一曲以及下一曲控制键。

将源程序导入单片机后,在proteus软件中进行仿真。

我通过仿真发现,按下按8 总结通过对单片机的学习,发现对单片机的硬件设计,软件设计掌握的a您好,为你提供优秀的毕业论文参考资料,请您删除以下内容,O(∩_∩)O谢谢!!!A national survey was recently launched to evaluate the eye health of Chinese children andteenagers.On June 6, China 's annual National Day for Eye Care, the China Youth Development ServiceCenter and Zhejiang Medicine, a leading li sted Chinese pharmaceutical company, jointlyannounced the kickoff of the survey.In about one month, a questionnair e compiled by top eye care medical experts in China willbe distributed through multiple online partners, including He , as well asthrough offline survey events held in universities, middle schools and primary schools acrosst he country.A report will be released based on the survey statistics and analysis, and most importantly,guidelines for pa rents and youth on how to care for the eyes and prevent myopia — agrowing problem in China's digitized society, will also be attached on the report."Myopia is not only a disease that makes people see things blurrily, but also leads to sev erecomplications, such as glaucoma (increased pressure within the eyeball), and can causeblindness," said Zhou Yueh ua, an established eye care specialist with Beijing TongrenHospital."It is very important for parents and children to k now about the risk and care for their eyes."There are about 450 million myopia patients in China. Among Chinese my opia patients,30million are severe patients, according to ZhouThe prevalence of myopia among high school and colleg e students is more than 70 percent,and the situation is continuously worsening, he added.Sun Zhu, director with the C hina Youth Development Service Center, said long hours ofstudy, lack of exercise, especially outdoor activities, and att achment to electronic screen aresome of the top reasons behind the widespread myopia problems, and the increase ofy ounger patients, although China has made great progress in improving the hardwarefacilities and lighting conditions i n schools.He said he hopes the survey will alert people on the threatening situation, and also helpmedical experts to be tter guideline parents and children's behaviors to care for eyes, basedon the timely and factual statistics the survey col lected.A series of follow-up events will also be held in six cities, including Jinan in Shandongprovince, and Changsha i n Hunan province, to educate people on how to care for eyes afterthe survey started. More and more Chinese are jogging to get and stay fit. Most joggers will run alone, but some will jog with friends or even coaches. The Beijing Olympic Forest Park is one of the most popular spots. It is packed with runners in the afternoon, usually after work, and at weekends. Jogging after a whole day's work can be a way to unwind. It is true for He Wenjun, whose workplace is right near the forest park. She discovered her athletic aptitude at the age of seven, when she began playing tennis. Then she turned to jogging, and she has persevered with it for 10 years. "I come to jog almost every day after work, whenever I have time. I think jogging is good for my health. And for me, a girl, it helps me to achieve to eternal goal, to keep slim," He said. He says she prefers jogging alone, so she can focus better. She loves jogging, even during Beijing's smoggy days. "If the smog is severe, I'll hold off jogging for a while. But if I really want to get away from work, I'll wear a mask, or just ignore the smog and go on jogging," she said. For those who are not so athletic, jogging also has its attractions. Wu Houbin started roughly two years ago, when he was severely obese. Within two months, his weight dropped from 82 kilograms to 64 kilograms. The success helped him recover health, and he has made friends. "Jogging does not require speed, but stamina. If you want to stick to the game, you need to take it as a mission, a habit, and then eventually a hobby," Wu said. But persevering with jogging is not always easy. Jogging is beneficial for heart-lung function, and the skeletal system, but doctors say improper technique damages the joints, especially the knees and ankles. "Excessive jogging wears down the body, and harms one's health. Poor technique harms the muscles and skeleton, and can cause secondary injures. And, jogging in a bad environment can cause circulation problems," said Lu Zhiyong, attending doctor, Sports Hospital, General Admin. of Sports.Dr. Lu has some tips for joggers, and thosewho are thinking of taking it up.He says peoplesh ould first evaluate their physical condition, to decide the amount and type of exercise, and jogging in the open air is better running on a treadmill. Conrad Macaowill run special programs for the entire month of October this year to support the Hong Kong Cancer Fund's Pink Revolution, an annual campaign that seeks to raise awareness and funds for breast cancer research, the hotel recently announced. A major sponsor of the campaign for three years in a row, Conrad Macao has pledged to donate a portion of its proceeds to the fund,includ ing those collected from selling its popular bear and rubber duck merchandise, in limited pink editions. Pink is the theme for floral arrangements and decorations in the hotel in October. In addition, on Fridays that month, members of the management and staff will add something pink to their uniforms, regular e-mails and handwritten guest cards. "Breast cancer is the most prevalent type of cancer among women in Hong Kong and is also of significant concern in Macao and around the world, regardless of age," general manager Bede Barry said in a statement. The hotel has enlisted the support of a number of international and local celebrities to help drive the cause, including South Korean actor Jung Suk Won. This year, a lucky guest who stays at the hotel during the campaign and also donates money for the cause will win a necklace specially designed by Arte Madrid, a Spanish jewelry brand. Women should strive to balance quality of work and life, and have children at a young age. As a doctor I see much suffering because of this imbalance. Xiao Ying, 36, works for a large law firm. Her job means lots of travel, a heavy caseload and a large number of meetings, so her schedule is hectic. She has been pregnant twice, but had abortions on both occasions because she felt her busy,high-pressure career wasn't conducive to raising a child. She planned to have children once she had achieved career success so she could provide a stable environment for her baby. After 10 years, Xiao felt the time was right, and she tried to conceive for about six months, but was unable to become pregnant. I conducted comprehensive physicalcheckups. The results suggested that Xiao's ovarian function has declined and a bilateral oviduct blockage has occurred, meaning that in vitro fertilization is her only option. So, after reducing her workload, Xiao underwent IVF treatment. Luckily, she got pregnant after just one treatment cycle, but later experienced vaginal bleeding, and rushed to the hospital. I told her to rest and carry on with the treatment (to prevent a miscarriage). As Zubin Zarthoshtimanesh, a yoga guru, demonstrated postures at a high school stadium in Dujiangyan city, Sichuan province, some 200 students sat on colorful mats watching him closely. It was part of the first India-China international yoga festival in the provincial capital, Chengdu, in Southwest China, where more than 1,000 fans from home and abroad gathered for lessons from 20 leading practitioners of the ancient Indian regimen, from June 17-21. Yoga is to India what perhaps tai chi is to China. Many countries other than India and China, also held the first World Yoga Day on June 21, after the United Nations last year agreed to Indian Prime Minister Narendra Modi's suggestion that a special day be marked in the year for the global practice of the stress-busting regimen, which is already a multibillion dollar industry in the United States. Modi said in the speech: "Yoga is an invaluable gift of India's ancient tradition. ... It is not about exercise but to discover the sense of oneness with yourself, the world and nature."Zarthoshtimanesh, who runs his own yoga center, Iyengar Yogabhyasa, in the Indian financial capital of Mumbai, says: "Chinese students are very respectful. For me, all students are the same no matter what their race is and where they come from. The most important thing is to remove mental walls." Zarthoshtimanesh learned yoga from the late Yogacharya Iyengar and traveled with the master to different countries. Consulate General of India in southern China's Guangzhou city organized the Chengdu festival. A terrifying wooden bridge in China has just been replaced by a glass one. This, the world’s longest glass-bottomed walkway, is located in Shiniuzhai Geopark in Hunan, and spans 300m (984f) and is 180m (590f) above ground. The floor is made of double-layered glass that is24mm (0.94in), and is reportedly 25 times stronger than regular window glass. The bridge had previously been made of wood, linking the two peaks of Stone Buddha Mountain, but 11 engineers working 12 hours a day converted it to glass. Previously, you were considered brave if you steeled yourself to cross the wooden walkway; now, with its glass bo ttom, the bridge is already being referred to as “hero bridge.”The popular chain's longtime executive chef embraces mapo tofu and other exotic elements for the burger-driven menu, Liu Zhihua reports.At the age of 37, Shanghai native Lin Zhengu has become a star as a Western cuisine chef in the Chinese metropolis, a city that has a wealth of Western restaurants. The executive chef of Blue Frog Bar and Grill, a popular burger-based restaurant and bar chain on the Chinese mainland, Lin is the soul of the restaurant franchise's team of more than 550 chefs. Many of the franchise's most popular dishes are his brainchild. Lin says his secret of success is innovation rooted in experience: He spends months every year traveling and eating worldwide, seeking new ingredients and inspirations that could improve the offerings of Blue Frog restaurants. The restaurant chain regularly launches a new seasonal menu, usually featuring eight new dishes with fresh ingredients. The best-selling seasonal dishes later replace the least popular items on the regular menu, which is usually updated in late fall and boasts a selection of about 40 dishes. "Food should have no boundaries," Lin says. "As long as the food tastes good and is healthy, it doesn't really matter where it originates or how it is cooked." Lin likes to give the American-style restaurants' menu some culinary touches from other countries, such as China and Mexico, and customers love such innovation, he says. He started his career as an apprentice in a Chinese kitchen in 1993. By chance he learned from a French chef in 1994, and soon became enamored with the world of Western food. During the next couple of years, he received strict training in Western culinary art from French, Chinese and German chefs. That was rare for a Chinese chef in the 1990s, he says-and so was being a Chinese chef who spoke fluent English. When an American entrepreneur invited him to join in his startup Blue Frog in 2000, Lin didn't hesitate to resign from a five-star hotel to work in the new restaurant with just five chefs, eager to explore the excitement of a life that had yet to unfold. Since that Shanghai launch, Blue Frog has opened 24 branches in seven cities across China, including Beijing, Tianjin, Chongqing and Nanjing in Jiangsu province. The new menu for this fall, which was launched in early September, showcases how flavors of East and West meet to create a variety of delicious burgers and other entrees in the cozy, soft-lit restaurants. I liked the mapo burger best. Just imagine the flavorful combination of the hot, mildly numb-spicy mapo tofu sauce and grilled 100-percent Australian beef patty, along with a slice of cheddar cheese and a side of french fries. The savory sauce helped highlight the patty's juicy, tender texture and its delicious beef flavor. Matching that Sichuan flavor with cheese created a new taste experience.。

基于51单片机的音乐播放器制作讲解

基于51单片机的音乐播放器制作讲解
The course design of the music player is the combination of software and hardware,Different notes in the music, the essence is different frequency of sound. Through the single-chip microcomputer produce different frequency of the pulse signal, amplified circuit, released by a buzzer to produce the harmonious beauty of music.according to each octave frequency calculate timer time constant, according to beat the the duration of the scale are given, finally realizes the play simple songs function. For example "There is only a good mother". Keywords: MCU,music player, Syllable frequency
II
目录Βιβλιοθήκη 目录第 1 章 引言................................................................................................................. 1 1.1 选题背景 ................................................................................................................... 1 1.2 设计原理 ................................................................................................................... 1 1.3 单片机简介 ............................................................................................................... 2 1.4 单片机的发展历史 ................................................................................................... 2 1.5 单片机的应用领域及发展趋势 ............................................................................... 2 第 2 章 方案论证......................................................................................................... 5 2.1 设计要求 ................................................................................................................... 5 2.2 系统描述 ................................................................................................................... 5 2.3 设计方案 ................................................................................................................... 6 2.3.1 集成电路 ................................................................................................................ 6 2.3.2 单片机最小系统 .................................................................................................. 10 2.3.3 结论 ...................................................................................................................... 12 第 3 章 硬件设计....................................................................................................... 13 3.1 硬件结构 ................................................................................................................. 13 3.2 中心控制模块 ......................................................................................................... 13 3.3 电源模块 ................................................................................................................. 16 3.4 控制电路 ................................................................................................................. 17 3.5 复位电路 ................................................................................................................. 17 3.6 电路设计所需要的器件 ......................................................................................... 19 第 4 章 软件设计....................................................................................................... 20 4.1 音乐发声设计原理 ................................................................................................. 20 4.1.1 发声原理 .............................................................................................................. 20 4.1.2 单片机产生不同频率脉冲信号的原理 .............................................................. 20 4.1.3 键控子程序 .......................................................................................................... 23 4.1.4 播放/暂停子程序 ................................................................................................. 24 4.1.5 曲目选择子程序 .................................................................................................. 24 4.2 音乐播放程序设计 ................................................................................................. 25
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
D2: M OV R3 , #2 4 8
DW 0 C0 2 H, 0 001 H, 0 C01 H, 1 3 04 H, l 1 0 4H , 0 F0 4 H, 0 E0 4 H, 0 D0 4 H DW 1 2 02 H, 0 0 01 H, l 201 H, l l 0 4 H, 0 F0 4 H, 1 0 0 4 H, 0 F0 4 H, 00 0 4 H DW 0 00 0 END

o C o o

c J 1
0RG 1 0 0 0 H
M 0V A




弦 乐 曰
MA I N: Mo V T Mo D, ≠ } 0 0 0 1 0 O O 1 B
A DD A, ≠ } 2
M0 V I E # 1 0 1 0 1 0 1 0 B S T AR T
参 考 文献
[ 1 ] 王亭亭 , 葛熠 , 李峰. 基于 A T 8 9 S 5 2 单片机 的 音乐播放器[ J ] . 科技信息 , 2 0 1 2 , ( 2 5 ) : 9 6 9 7 . 【 2 ] 罗卫 星. 单片机 音乐播放 器设 计 [ J ] . 科 学之
友, 2 0 1 0 , ( 1 1 ) : 1 3 7 . 1 3 8 .
MO VC A, @A + DP T R
M OV TH0. A
MOV T H 1 , 3 2 H
CPL P1 . 1
M OV 3 0 H. A
RE L AY: MO V R5 , ≠ } 2; 延时 1 8 7 ms
DI : M OV R4 , #1 8 7
SI NG: DEC A
U MP S T ART
TI M E0: M OV TL0 . 3 1 H
RL A
RL A
M 0V B. A
M OV T HO - 3 0 H
CPL P1 . 0
RETI
M OV DPTR, ≠ } TAB 1
TI M E1 : M OV TL1 , 3 3 H
LJ MP M AI N
M OV A. B
0R G 0 0 O B H
I NC A

L J MP T I ME 0
0RG 0 0 1 BH
LJ MP TI M E1
MOV C A, @A+ D P T R
M 0V T L0 . A
M OV 3 1 H. A
乐, 仿真 电路简单易行。操作步骤为 : ( 1 ) 利用 K e i l
C5 1 软件建 立工 程项 目, 对 汇编 程序 编译 调试 。( 2 ) 通过 P r o t e u s 软 件建 立硬 件 仿 真 电路 。 ( 3 )调 用 “ .
低 音 区
DW 6 4 1 0 3 , 6 4 4 6 3, 6 4 2 6 0, 6 4 5 8 0 , 6 4 4 0 0, 6 4 6 8 4,
高音区
DW 6 5 1 7 8 , 6 5 2 6 8, 6 5 2 1 7, 6 5 2 9 7 , 6 5 2 5 2, 6 5 3 2 3 ,
6 5 2 8 3, 6 53 47
[ 3 】 远飞. 基于单片机 的音乐播放器的仿 真与制
作[ J 】 . 电子元 器件 应用 , 2 0 1 0 , 1 2 ( 1 2 ) : 4 7 — 4 9 .
; 生 日快 乐音 符码 与节 拍码
TAB2: DW 0C0 2 H, 0 0 0l H, 0C01 H, 0 DO 4H , 0 C0 4 H, 0F 0 4H , 0E0 4 H, 0 00 4 H
6 45 2 4, 6 4 77 7 DW 6 4 58 0, 6 48 2 0, 6 46 8 4, 6 4 89 8, 6 47 7 7, 6 49 68;
H E X ” 文件 , 采用 P r o t e u s 运行仿真。该播放器设计 仿真已通过测试 , 运行 良好 , 可以发出优美的和弦音

中音 区
DW 64 8 2 0, 6 4 99 4, 6 48 9 8, 6 5 05 8,6 4 9 68, 6 511 0, 6 5 0 3 0, 6 51 5 7 DW 6 5 05 8, 6 51 7 8, 6 51 1 0, 6 5 21 7, 65 1 5 7, 6 5 25 2;
DJ NZ R3 , ¥
DJ NZ R4, D2 DJ NZ R5, D1 DJ NZ R6, DELAY
RET
3 结 束语
本 文 采 用 AT 8 9 C5 1 单 片机 控 制 蜂 鸣 器发 出音
; 定时器初值表
TAB1 : DW 6 3 6 28, 6 41 0 3, 6 3 8 3 5, 6 4 2 60, 6 40 21, 6 44 0 0;
M OV A. B
GAP : LC ALL DE L AY
MO VC A, @A 十 D P T R
J NZ SI NG CLR TR0
CLR TR l
I N C 2 O H
UMP NEXT OVER: CLR TR0
CLR TR l
U MP GAP

MOV C A, @A + D P T R
M OV TH1 , A
M OV 3 2 H, A M 0V A. B ADD A, ≠ f 3
: M OV 2 0 H, # 0 0

播 放 器

NE XT : MOV A
RL A M OV B, A
2 O H

I N C A
M OV DP TR, ≠ ≠ TAB2
M0 VC A, @A+ DP T R
M OV TL1 , A
MO V C A, @A + DP T R
M 0V R6. A J Z 0VER
MO V 3 3 H, A
S ETB TR0 S ETB TR1
相关文档
最新文档