目 录
引言 .................................................................................................................................................1
1 总体设计 .....................................................................................................................................2
1.1 设计意义和目的 ...................................................................................................................2
1.2 设计功能要求 .......................................................................................................................2
1.3 设计方案 ...............................................................................................................................2
1.4 设计原理 ...............................................................................................................................2
1.5 总体设计框图 .......................................................................................................................3
2 硬件设计 .....................................................................................................................................4
2.1 电路组成及工作原理 ...........................................................................................................4
2.1.1 电路组成 ........................................................................................................................4
2.1.2 电路工作原理 ................................................................................................................4
2.2 AT89C51 的简介...................................................................................................................5
2.2.1 AT89C51 功能概述 ........................................................................................................5
2.2.2 AT89C51 的管脚图 ........................................................................................................5
2.2.3 AT89C51 单片机的引脚介绍 ........................................................................................5
2.3 晶振电路 ...............................................................................................................................6
2.4 扬声器电路 ...........................................................................................................................7
2.4.1 蜂鸣器简介 ....................................................................................................................7
2.4.2 扬声器电路 ....................................................................................................................7
2.5 显示电路 ...............................................................................................................................8
2.6 更换歌曲电路 .......................................................................................................................9
2.7 复位电路 ...............................................................................................................................9
3 软件设计 ...................................................................................................................................10
3.1 软件系统介绍 .....................................................................................................................10
3.2 编程语言的选择 .................................................................................................................10
3.3 演奏原理 .............................................................................................................................10
3.3.1 如何产生音乐频率 ......................................................................................................10
3.3.2 如何产生节拍 ..............................................................................................................12
3.4 歌谱 .....................................................................................................................................12
3.5 建立步骤 .............................................................................................................................13
3.6 程序流程图 .........................................................................................................................14
4 仿真和调试 ...............................................................................................................................15