资源预览内容
第1页 / 共33页
第2页 / 共33页
第3页 / 共33页
第4页 / 共33页
第5页 / 共33页
第6页 / 共33页
第7页 / 共33页
第8页 / 共33页
第9页 / 共33页
第10页 / 共33页
亲,该文档总共33页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
I摘 要本文是应用 STC89C52 单片机来设计硬件电路,以此控制音乐的产生播放。并利用C 语言进行程序设计。通过控制单片机内部的定时器来产生不同频率的方波,驱动蜂鸣器发出不同音调,再利用延迟来控制发音时间的长短,以此来表示不同音阶的变化。蜂鸣器借助这种变化来产生音乐。本设计是 8051 芯片的电路为基础,外部加上功率放大器、放音设备,以此来实现音乐演奏控制器的硬件电路,通过软件程序来控制单片机内部的定时器使其演奏出设定的音乐。利用琴键控制定时器的开中断和闭中断,即实现发音和闭音。在此期间再通过对定时器的定时时间进行控制来产生不同频率的方波,驱动蜂鸣器发出不同音阶的声音。该软、硬件系统具有很好的通用性,很高的实际使用价值,为广大单片机和音乐爱好者提供了很好的借鉴。关键词:单片机;音乐;C 语言;蜂鸣器IIAbstractThis paper is the application of STC89C52 microcontroller to design the hardware circuit to control the generation of music playing by using C language program design. Through the control of the single chip microcomputer timer to produce different inside the frequency of square wave, drive speaker tones, and then delay to control the pronunciation of the length of time, so as to indicate different scales of change. This change through the buzzer to generate program of musicThis design is 8051 chips based circuit, external plus power amplifier and let the sound equipment, so as to realize the music playing hardware circuit, through the software program to control of the single chip microcomputer timer internal play a set of music. Using the keys of the timer control open interrupt and closed interrupt, pronunciation and closed sound is implemented. In this period again through the timing of timer control time to produce different frequency of square wave, drive out the sound of different scales buzzer.The software and hardware system has a good generality and high practical value for the single-chip microcomputer and music lovers to provide a good reference.Keywords: AT89S51 SCM; music;C language program; buzzer目录1摘 要 .IAbstract .II绪论.11 概述.11.1 单片机的产生和发展.11.1.1 什么是单片机 .11.2 单片机的发展史及发展趋势 .11.3 单片机的特点及应用 .21.3.2 单片机的特点 .21.3.3 单片机的应用 .22 STC89C52 单片机的结构与原理 .32.1 STC89C52 内部组成结构 .32.2 STC89C52 引脚组成 .42.3 STC89C52 硬件组成 .42.3.1 引脚功能部件和特性 .42.3.2 芯片简介 .42.3.3 引脚功能 .52.3.4 单片机工作的最小化配置 .72.4 STC89C52 中断系统 .92.4.1 中断的概念 .92.4.2 STC89C52 中断系统 .102.4.3 中断响应过程 .153 系统设计总体方案 .163.1 设计应用系统时应考虑的问题 .163.2 设计使用芯片 STC89C52 介绍 .164 单片机音乐演奏控制器的软硬件设计 .184.1 单片机产生音调的基础知识 .18 4.2 硬件电路 .
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号