基于单片机的音乐电子琴设计

  • 格式:doc
  • 大小:9.94 MB
  • 文档页数:41

题 目 基于单片机的音乐电子琴设计

摘 要

电子琴的出现可以追溯到几百年前,在这个几百年的过程中,它已经从庙堂之高飞入寻常百姓家,成为再普通不过的商品了。作为最受大众喜爱的微型电子琴,功能齐全人性化,价格也是非常令人满意,喜爱最深的当属初学者。嵌入式电子技术的大步迈进也间接带动了微型电子琴技术的向前发展,单片机、PLC还有FGPA各有各自的长处。一般说来,好的产品优势之处总是不谋而合,音色效果极佳;技术成熟,系统不会紊乱;价格低;接口齐全等都是优势之处。

本次设计以STC89C52单片机为核心,除了单片机以外,系统还有三个模块:分别为键盘扫描模块,扬声器模块,和液晶显示模块。本设计综合运用了硬件和软件,在这些基础上设计了一款简易的音乐电子琴,可以通过该设计实现对音乐的演奏。

关键词:音乐电子琴;单片机;演奏

ABSTRACT

From the invention of the electric piano several hundred years ago to now, it has

entered millions of households and become a popular commodity. Especially the

miniature electronic keyboard, although it is cheap, but it is powerful, it is deeply loved by

customers, especially those who just started to learn piano. With the development of

embedded electronic technology, the development of the miniature electronic keyboard

has become more and more mature, and the use of single-chip microcomputers, PLCs, and

FGPA have their merits. But overall, the outstanding products are similar, the first to

produce high-quality sound effects, the second is mature technology, the system is stable,

the third is low cost, and the fourth is good scalability.

This design takes the STC89C52 MCU as the core. Besides the MCU, the system has

three modules: the keyboard scanning module, the speaker module, and the liquid crystal

display module. The design uses a combination of hardware and software. Based on these

designs, a simple music keyboard is designed to enable music to be played through the

design.

Key words: Music Electronic organ; Single-chip computer; Play

目 录

第一章 绪论 ............................................................................................................................ 1

1.1研究现状 ........................................................................................................................ 1

1.2课题研究的目的和意义 ............................................................................................. 2

1.3国内外概况 .................................................................................................................... 2

第二章 硬件部分 ................................................................................................................. 4

2.1 STC89C52单片机概述 ............................................................................................... 4

2.1.1晶振电路 ............................................................................................................ 9

2.1.2复位电路 ............................................................................................................ 7

2.2按键部分电路概述 ...................................................................................................... 7

2.3 音阶设计原理 .............................................................................................................. 9

2.4 Nokia5110显示简介................................................................................................ 12

2.5 miniplay音乐模块概述 ......................................................................................... 12

2.5.1主要功能及参数 ............................................................................................ 13

2.5.2实际应用 .......................................................................................................... 13

第三章 软件部分 ............................................................................................................... 17

第四章 硬件调试部分 .................................................................................................... 20

4.1常见的硬件故障 ......................................................................................................... 20

4.2硬件调试方法 ............................................................................................................. 20

结束语 .......................................................................................................................................... 24

致 谢 .......................................................................................................................................... 25

附录A ........................................................................................................................................... 27

附录B ........................................................................................................................................... 28