文档详情

基于单片机的可控数字音乐盒设计_精品.doc

发布:2018-04-04约1.96万字共38页下载文档
文本预览下载声明
基于51单片机的可控数字音乐盒设计 摘 要 本文是一篇基于AT89C51单片机的可控数字音乐盒的程序设计。该音乐盒是一个依据单片机技术原理,通过PROTEUS仿真软件对硬件电路进行仿真制作以及利用KEIL软件对音乐盒源程序进行C语言编译,而设计制作出的一个多功能数字音乐盒。 该音乐盒通过控制单片机内部的定时器来产生不同频率的方波,驱动喇叭发出不同音调的音乐。该程序通过把乐谱转化成相应的定时常数来驱动发音设备演奏出悦耳动听的音乐。 本音乐盒一共设计了五首歌曲,同时还设计了三种LED彩灯的变化花样。在演奏歌曲时彩灯随音调闪烁。在停止演奏歌曲时三种彩灯花样开始闪烁。歌曲和花样均可随意切换。与此同时,数码管也不断变化数字,以此显示歌曲和彩灯花样的序号。 关键词:数字音乐盒;AT89C51;KEIL;PROTEUS;数码管 THE DESIGNATION OF CONTROLLABLE DIGITAL MUSIC BOX BASED ON 51 SCM ABSTRACT This paper explains the program designation of controllable digital music box based on AT89C51. This music box is designed by the idea that a multi-functional digital music box can be made based on the technical principle of single chip microcomputer (SCM), together with using the PROTEUS to simulate the hardware circuit and using KEIL to programme the source of music box which is compiled with C language. This music box can produce square waves of different frequency in control of the timer inside SCM, and music of different tunes by driving speaker. The program is made use of to drive the sounding equipment to play pleasant music by the way of changing music score into the corresponding timing constant. This music box is totally designed with five songs, and also with three changeable patterns of LED colorful lights. While the songs are being performed, the colorful lights are flashing with tones. While the songs are stopped playing, the colorful lights start to flash with three changeable patterns. The songs and patterns can be free to switch. At the same time, the digital tube is also constantly changing figures to show the serial number of the songs and the patterns of the colorful lights. Key words: Digital music box; AT89C51; KEIL; PROTEUS; Digital tube 目 录 1 前言------------------------------------------------------------------------------------------------------1 2 单片机和音乐盒硬件的功能------------------------------------------------------------------------2 2.1 AT89C51芯片的功能--------------------------------------------------------
显示全部
相似文档