资源描述:
《单片机音乐控制流水灯》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、摘要本设计是一种基于AT89C51单片机音乐控制彩灯的方案,实现单片机演奏音乐,并且对LED彩灯随音符频率的不同而闪烁发光。本方案以AT89C51单片机作为主控核心,利用三极管和蜂鸣器,通过三极管放大电流使用蜂鸣器播放音乐,利用编程实现亮灯循环模式,在有8个LED彩灯,根据用户需求可以编写若干种亮灯模式.例如左右闪烁,隔几个亮灭,蜂鸣器可以根据用户需求改写编程播放各种音乐。本方案具有设计简单、体积小、元器件少、电路结构简单等优点。该设计方案设计及其简单,典型的89c51单片机,亮灯模式多,播放各种类型的音乐,具有体积小、价格低、
2、低能耗等优点。在美丽的都市夜晚,彩灯的循环亮灭,播放动人的音乐,衬托出美丽的氛围,音乐彩灯具有更广阔的发展天地。关键字:AT89C51LED彩灯音乐AbstractThisdesignisamusicalbasedonAT89C51microcontrollercontrolprogramLantern,realizeMCUplayingmusic,AndtheLEDlightsonthefrequencyofdifferentnoteswiththelightflashing。TheprogramforAT89C51micro
3、controllerasthecontrolcenter,useoftransistorandbuzzer,thecurrentthroughthetransistoramplificationusingthebuzzertoplaymusic,Usingprogramminglightingcyclemode,with8LEDLantern,accordingtouserneedstowritesomekindofswitch-mode.Forexample,flashingaround,everyfewlightoff,th
4、ebuzzercanbeadaptedaccordingtouserrequirementsplayavarietyofmusicprogramming.Theprogramissimpleindesign,smallsize,lesscomponents,andsimplecircuitstructure.Thedesignandsimpledesign,thetypical89c51microcontroller,aswitch-modeandmore,playingalltypesofmusic,hasasmallsize
5、,lowpriceandlowpowerconsumptionandsoon.Inthebeautifulcityatnight,lanternslightoffcycle,playbeautifulmusic,bringsoutthebeautifulatmosphere,musicCarnivalwiththedevelopmentofabroaderworld.15Keywords:AT89C51LEDLanternmusic目录绪论---------------------------------------------
6、----------------41音乐流水灯方案设计与选择---------------------------------------41、1设计要求-------------------------------------------------51、2基本原理-------------------------------------------------51、3设计电源-------------------------------------------------5-61、4频率音符-----------------
7、--------------------------------62音乐流水灯设计过程----------------------------------------------72、1元件选择-------------------------------------------------72、2电路设计-------------------------------------------------72、2、1元器件介绍------------------------------------------7-92、2、2音乐流
8、水灯构思---------------------------------------9-112、3软件设计-------------------------------------------------112、3、1编程介绍-----------------