单片机控制音乐播放-外文翻译

合集下载

基于单片机控制的MP3音乐播放器的设计

基于单片机控制的MP3音乐播放器的设计

目录1引言 (1)2硬件设计 (2)2.1硬件电路的设计框图 (2)2.2硬件电路设计模块的选定 (2)2.2.1中心模块 (2)2.2.2播放模块 (3)2.2.3显示模块 (4)2.2.4电子琴模块 (4)2.3各硬件电路的具体设计 (5)2.3.1 AT89S52控制模块的设计 (5)2.3.2按键模块的设计 (6)2.3.3扬声器播放模块的设计 (7)2.3.4 LCD显示电路的设计 (7)2.3.5彩灯伴奏电路的设计 (8)3软件设计 (9)3.1单片机发声的基本原理 (9)3.2设计的相关音乐说明 (9)3.3切换原理 (10)3.4音乐播放器软件程序设计 (10)3.4.1按键扫描子程序设计 (10)3.4.2 1ms延时程序设计 (14)3.4.3 LCD显示子程序设计 (15)3.4.4函数初始化子程序设计 (16)3.4.5系统主程序设计 (17)4结论 (19)参考文献 (20)附录一硬件原理图 (21)附录二软件主程序 (22)致谢............................................................................................................... 错误!未定义书签。

摘要目前流行的MP3播放器的音质已相当好,但略感遗憾的是除了选择歌曲和显示歌名外,绝大部分播放器没有诸如随意弹奏乐曲、乐曲节奏跳动等功能。

而随着人们生活水平的不断提高,单片机控制无疑是人们追求的目标之一。

要为现代人工作、生活提供更好的更方便的服务就需要从单片机技术着手,一切向着数字化控制、智能化控制方向发展。

本设计是采用单片机为核心设计的数字音乐播放器。

本设计在实现音乐的播放及歌曲名显示等基本功能的基础上进行了扩展,添加了彩灯伴奏、按键弹奏、显示音乐节拍等功能。

本论文给出了系统方案的建立、硬件电路的详细设计及软件的程序实现。

基于单片机控制音乐播放

基于单片机控制音乐播放

硅湖职业技术学院毕业论文(设计)题目基于单片机控制的音乐播放器年级08级专业机电一体化姓名李耘学号*********指导老师李巧红2011 年 5 月 1 日基于单片机控制的音乐播放李耘【摘要】在电子技术日月更新、不断换代,计算机程序设计语言应用广泛,特别是单片机技术日趋发达的情况下,为了培养并增强设计自主性和动手能力强的人才,了解单片机强大的设计功能。

在此次设计中主要采用单片机AT89C52和一个SOUNDER(喇叭)来实现音乐的播放。

【关键词】单片机音乐播放器控制一、绪论现在各种各样的音乐播放器呈现在我们面前,外观越来越精美,功能越来越多,体积越来越小,重量也越来越小、价格越来越便宜。

同时,随着当代手机行业的快速发展,许多手机厂商为了能够吸引广大的客户受到消费者的青睐,致此他们开始研究在手机上实现音乐和视频的播放,因此现在的手机都能够轻松的播放音乐了。

这样人们就更很容易携带,随时随地都可以听,以便来缓解人们的疲劳、压抑、愉快人们的心情等,甚至有时还可以借着音乐来抒发自己的感情,传达我们对朋友的祝福。

因此,在不知不觉中它成为了人们生活的一样必需品,无论到哪里、无论什么时候都可以听到我们想听的音乐。

在实际中参照单片机相关资料,就可容易的利用单片机设计出一个音乐发生器。

在设计过程中人们还可考虑用多种方法进行实现,这样不但很好的发挥了人们的创新精神,还提高了动手能力、综合分析能力及专业知识运用能力。

二、音乐基础知识音作为一种物理现象,是由于物体振动而产生的,振动产生的声波作用于人耳,听觉系统将神经冲动传达给大脑,进而产生听觉。

人耳能听到的声音频率大约在11—20000Hz,而音乐使用的音一般在27—4100Hz。

一首音乐就是由许多不同的音符组成的,而每一个音符对应着不同的频率,这样就可以利用不同的频率的组合,加以拍数对应的延时来构成不同的音乐。

音乐的产生需要不同频率的音频脉冲,对于单片机而言,可以利用它的定时/计数器产生这样的方波频率信号。

单片机控制音乐播放毕业设计论文[管理资料]

单片机控制音乐播放毕业设计论文[管理资料]

毕业论文论文题目:单片机控制音乐播放器学号:姓名:专业:班级:指导教师:完成日期:目录摘要 (3)前言 (4) (5) (6) (7) (12)(1)单片机CPU结构 (13)(2)单片机定时器中断讲述(c语言) (14)三. 致谢 (16)参考文献 (17)摘要21世纪科技时代,,而利用单片机存储音乐,﹑价格优﹑外围电路简单的特点,,用80C51单电机及少数外围电路控制MUSIC播放。

对于单电机产生音乐,,不同的声音对应不同的频率,,有8个基本音符:do ﹑re﹑mi﹑fa﹑so﹑la﹑xi﹑do,,,并用两个键控制播放和停止.这里,我用8051单片机控制音乐。

由键盘控制播放,用运算放大器的同相放大方式驱动SPEAKER本课题设计的音乐闹钟系统结构简单,造价成本低,功能齐全,具有很强的实用性。

关键词:单片机,微处理器,LCD,89C52,AMPIRE128×64前言目前单片机渗透到我们生活的各个领域,几乎很难找到哪个领域没有单片机的踪迹。

导弹的导航装置,飞机上各种仪表的控制,计算机的网络通讯与数据传输,工业自动化过程的实时控制和数据处理,广泛使用的各种智能IC卡,民用豪华轿车的安全保障系统,录像机、摄像机、全自动洗衣机的控制,以及程控玩具、电子宠物等等,这些都离不开单开发与应用将造就一批计算机应用与智能化控制的科学家、工程师。

科技越发达,智能化的东西就越多,使用的单片机就越多。

看来学单片机是社会发展的需求。

这种控制系统具有许多优点,如:各个控制功能的分散使得每台微机的任务相应减少,功能更明确,组成更简单,可靠性更高;在多机系统中,各台微机并行工作,大部分采集和控制功能都分散到各个自系统中,运行速度快;开发、维护、扩充方便。

毕业设计是学生学完两年教学计划所规定的全部基础课和专业课后,综合运用所学的知识,与实践相结合的重要实践性教学环节。

它是大学生活最后一个里程碑,是三年大学学习的一个总结,是我们结束学生时代,踏入社会,走上工作岗位的必由之路,是对我们工作能力的一次综合性检验。

基于单片机的音乐播放系统.

基于单片机的音乐播放系统.

音乐播放系统设计李凯龙目录摘要 (1)1 绪论 (1)1.1 功能需求 (2)2 硬件设计 (2)2.1 音乐播放系统的电路原理图 (2)2.2 电源输入的电路原理图 (3)2.3 晶振电路 (3)3 系统工作原理 (4)3.1 系统的总体方案设计 (4)3.2 主控芯片AT89C51简介 (4)4 线路连接 (5)5 软件设计 (6)5.1 主程序流程图 (6)6 调试与故障分析 (8)6.1 软件程序调试 (8)6.2 硬件电路调试 (8)7 结论 (9)8 致谢 (9)参考文献 (10)附录一:电路图 (11)附录二:主程序 (11)摘要本文将介绍一种以89C51型单片机为基础元件设计的自动音乐播放器。

在当今这个科技高速发展的时代,生活节奏的加快,人们长期处于工作、学习压力过大的状态,对于调节心理压力而言音乐对于每一个人都十分重要,由此音乐播放器在国内已经开始普及。

校园里的上下课的铃声,宿舍内早晨的起床号声音,都由以前枯燥刺耳的铃音转变成了好听的音乐,公路、广场中的计时装置也逐渐开始采用音乐来充当铃声。

此装置不仅为人们日常生活的计时提供了方便,同时也为目前快节奏的生活带来了乐趣。

本文是应用MCS-51单片机原理和控制理论设计音乐演奏控制器的硬件电路,并利用C语言进行程序设计。

通过控制单片机内部的定时器来产生不同频率的方波,驱动蜂鸣器发出不同音调的音乐,再利用延迟来控制发音时间的长短。

把乐谱转化成相应的定时常数就可以从发音设备中演奏出悦耳动听的音乐。

这种控制电路结构简单,可读性高,应用性强;软件程序适应范围广,对于不同的音乐只需要改变相应的定时常数即可。

关键词:音乐播放器,51单片机,C语言1 绪论单片机,更确切地说应称为作微控制器,是20世纪70年代中期发展起来的一种面向控制的大规模集成电路模块,其特点是功能强、体积小、可靠性高、价格低廉。

它一面世便在工业控制、数据采集、智能仪表化、机电一体化、家用电器等领域得到了广泛应用,极大地提高了这些领域的技术水平和自动化程度。

PIC单片机实现音乐播放

PIC单片机实现音乐播放

PIC单片机实现音乐播放源程序:以下程序要用二个定时器资源,凡是有二个定时器的PIC单片机均可实现,该范例需要的MCU是MICROCHIP PIC16C62INCLUDE "D:\PIC\P16XX.EQU" ;该文件在MICROCHIP光盘中可找到;**************************************************#define BeepOut RC,4;**************************************************W_TEMP EQU 0X20 ;(0XA0)STATUS_TEMP EQU 0X21BeepCnt equ 30hTmrBak equ 31hBeepMode equ 32hSflag equ 33h;**************************************************CSTIME100MS equ .8;;**************************************************;SflagFg_100ms equ 0FgBeep equ 1;**************************************************ORG 000H;GOTO MAIN ; Skip over interrupt vecterORG 04H ; Interrupt VectorGOTO INTZ;**************************************************OkTab:movf BeepCnt,waddwf PCL,fretlw .255-.130;0xf6 ;1 ;retlw .255-.126;0xfa ;2 ;retlw .255-.119; 0xfd ;3 ;retlw 0;**************************************************WhisleTab:movf BeepCnt,waddwf PCL,fretlw .255-.239;523Hz ;0 ;retlw .255-.179;698Hz ;1 ;retlw .255-.159;784Hz ;2 ;retlw .255-.119;1046Hz ;3 ;retlw .0;************************************************** HangTab:movf BeepCnt,waddwf PCL,fretlw .255-.159; 784Hz ;0 ;retlw .255-.119; 1046Hz ;1 ;retlw .255-.150; 830Hz ;2 ;retlw .255-.112 ;1109Hz ;3 ;retlw .255-.142 ;880Hz ;4 ;retlw .255-.106;1174Hz ;5 ;retlw .255-.134;932Hz ;6 ;retlw .255-.100;1244Hz ;7retlw .255-.126;988Hz ;8;retlw .255-.94;1318Hz ;9;retlw .255-.119;1046Hz ;10 ;retlw .255-.89;1397Hz ;11 ;retlw .0;************************************************** WelcomTab:movf BeepCnt,waddwf PCL,fretlw .255-.89;1397Hz ;11 ;retlw .255-.119;1046Hz ;10 ;retlw .255-.94;1318Hz ;9;retlw .255-.126;988Hz ;8;retlw .255-.100;1244Hz ;7retlw .255-.134;932Hz ;6 ;retlw .255-.106;1174Hz ;5 ;retlw .255-.142 ;880Hz ;4 ;retlw .255-.112 ;1109Hz ;3 ;retlw .255-.150; 830Hz ;2 ;retlw .255-.119; 1046Hz ;1 ;retlw .255-.159; 784Hz ;0 ;retlw .0;************************************************** BeepModeJmp:addwf PCL,fb psWhisle ;0b psOk ;1b psHang ;2b psWelcom ;3;************************************************** IO_SET:MOVLW B'11001011'MOVWF TRISAMOVLW B'00001100'movwf TRISBMOVLW B'00000011'movwf TRISC ; Set Port_C to all outputsBANK0_RETURN;**************************************************SYS_SET:BANK1_MOVLW B'00000111' ; 1:256 TMR0分频MOVWF OPTION_RBSF PIE1,TMR2IE ;TMR2中断允许BANK0_MOVLW B'00000001' ;开TMR1MOVWF T1CONbsf INTCON,TOIE ;TMR0中断允许BSF INTCON,PEIE ;允许所有未被屏蔽之外围接口中断RETURN;**************************************************MAIN: ; Main rotationCALL IO_SETMOVLW B'00000000' ;关所有中断MOVWF INTCON;****************************CALL SYS_SET;****************************call PlayPsWelcom ;上电提示音MAINLOOP:bsf INTCON,GIE ;开所有中断CLRWDT ; Clear WDTcall BeepForB MAINLOOP;**************************************************INTZ:PUSH ; Push ;中断服务程序BTFSC PIR1,TMR2IF ;测试TMR2中断标志位b INT_TMR2 ;BTFSC INTCON,TOIF ;测试TMR0中断标志位GOTO INT_TMR0IntRet:POP ; Pop;************************************************** INT_TMR2:BCF PIR1,TMR2IF ;清TMR2中断标志位movf TmrBak,wmovwf TMR2CPL BeepOutBeeperEnd:b IntRet;************************************************** INT_TMR0: ;定时0中断BCF INTCON,TOIF ; clear INTFMOVLW .255-.38 ;10msMOVWF TMR0;====================decfsz T100ms,fb int_tmr0_retmovlw CSTIME100MSmovwf T100msbsf Sflag,Fg_100ms;=====================int_tmr0_ret:b IntRet;************************************************** PlayPsWhisle:bsf Fg,FgBeepclrf BeepCntmovlw .0movwf BeepModemovlw CSTIME100MSmovwf T100msretlw 0;************************************************** PlayPsOk:bsf Fg,FgBeepclrf BeepCntmovlw .1movwf BeepModemovlw CSTIME100MSmovwf T100msretlw 0;************************************************** PlayPsHang:bsf Fg,FgBeepmovlw .2movwf BeepModemovlw CSTIME100MSmovwf T100msretlw 0;************************************************** PlayPsWelcom:bsf Fg,FgBeepclrf BeepCntmovlw .3movwf BeepModemovlw CSTIME100MSmovwf T100msretlw 0;************************************************** ;音乐播放程序;BeepMode=0 : psWhisle;BeepMode=1 : psOk;BeepMode=2 : psHang;BeepMode=3 : psWelcom;************************************************** BeepFor:btfss Sflag,Fg_100msb BeepForEndbcf Sflag,Fg_100msbtfss Sflag,FgBeepb BeepForEndMOVLW B'00000101' ;开TMR2 1:4分频MOVWF T2CONmovf BeepMode,wb BeepModeJmppsWhisle:call WhisleTabb BeepPlaypsOk:call OkTabb BeepPlaypsHang:call HangTabb BeepPlaypsWelcom:call WelcomTabb BeepPlayincf BeepCnt,fmovwf TmrBakmovf TmrBak,fbtfsc status,zb BeepOffmovlw .1xorwf TmrBak,wbtfsc status,zb BeepStopb BeepForEndBeepOff:clrf BeepCntbcf Sflag,FgBeepbcf BeepOutbcf T2CON,TMR2ONb BeepForEndBeepStop:bcf T2CON,TMR2ON ;stopbcf BeepOutBeepForEnd:retlw 0;************************************************** END。

单片机控制系统外文翻译

单片机控制系统外文翻译

Microcomputer SystemsElectronic systems are used for handing information in the most general sense; this information may be telephone conversation, instrument read or a company’s accounts, but in each case the same main type of operation are involved: the processing, storage and transmission of information. in conventional electronic design these operations are combined at the function level; for example a counter, whether electronic or mechanical, stores the current and increments it by one as required. A system such as an electronic clock which employs counters has its storage and processing capabilities spread throughout the system because each counter is able to store and process numbers.Present day microprocessor based systems depart from this conventional approach by separating the three functions of processing, storage, and transmission into different section of the system. This partitioning into three main functions was devised by V on Neumann during the 1940s, and was not conceived especially for microcomputers. Almost every computer ever made has been designed with this structure, and despite the enormous range in their physical forms, they have all been of essentially the same basic design.In a microprocessor based system the processing will be performed in the microprocessor itself. The storage will be by means of memory circuits and the communication of information into and out of the system will be by means of special input/output(I/O) circuits. It would be impossible to identify a particular piece of hardware which performed the counting in a microprocessor based clock because the time would be stored in the memory and incremented at regular intervals but the microprocessor. However, the software which defined the system’s behavior wou ld contain sections that performed as counters. The apparently rather abstract approach to the architecture of the microprocessor and its associated circuits allows it to be very flexible in use, since the system is defined almost entirely software. The design process is largely one of software engineering, and the similar problems of construction and maintenance which occur in conventional engineering are encountered when producing software.The figure1.1 illustrates how these three sections within a microcomputer are connected in terms of the communication of information within the machine. The system is controlled by the microprocessor which supervises the transfer of information between itself and the memory and input/output sections. The external connections relate to the rest (that is, the non-computer part) of the engineering system.Fig.1.1 Three Sections of a Typical MicrocomputerAlthough only one storage section has been shown in the diagram, in practice two distinct types of memory RAM and ROM are used. In each case, the word ‘memory’ is rather inappropriate since a computers memory is more like a filing cabinet in concept; information is stored in a set of numbered ‘boxes’ and it is referenced by the serial number of the ‘box’ in question.Microcomputers use RAM (Random Access Memory) into which data can be written and from which data can be read again when needed. This data can be read back from the memory in any sequence desired, and not necessarily the same order in which it was written, hence the expression ‘random’ access memory. Another type of ROM (Read Only Memory) is used to hold fixed patterns of information which cannot be affected by the microprocessor; these patterns are not lost when power is removed and are normally used to hold the program which defines the behavior of a microprocessor based system. ROMs can be read like RAMs, but unlike RAMs they cannot be used to store variable information. Some ROMs have their data patterns put in during manufacture, while others are programmable by the user by means of special equipment and are called programmable ROMs. The widely used programmable ROMs are erasable by means of special ultraviolet lamps and are referred to as EPROMs, short for Erasable Programmable Read Only Memories. Other new types of device can be erased electrically without the need for ultraviolet light, which are called Electrically Erasable Programmable Read Only Memories, EEPROMs.The microprocessor processes data under the control of the program, controlling the flow of information to and from memory and input/output devices. Some input/output devices are general-purpose types while others are designed for controlling special hardware such as disc drives or controlling information transmission to other computers. Most types of I/O devices are programmable to some extent, allowing different modes of operation, while some actually contain special-purpose microprocessors to permit quite complex operations to be carried out without directly involving the main microprocessor.The microprocessor processes data under the control of the program, controlling the flow ofinformation to and from memory and input/output devices. Some input/output devices are general-purpose types while others are designed for controlling special hardware such as disc drives or controlling information transmission to other computers. Most types of I/O devices are programmable to some extent, allowing different modes of operation, while some actually contain special-purpose microprocessors to permit quite complex operations to be carried out without directly involving the main microprocessor.The microprocessor , memory and input/output circuit may all be contained on the same integrated circuit provided that the application does not require too much program or data storage . This is usually the case in low-cost application such as the controllers used in microwave ovens and automatic washing machines . The use of single package allows considerable cost savings to e made when articles are manufactured in large quantities . As technology develops , more and more powerful processors and larger and larger amounts of memory are being incorporated into single chip microcomputers with resulting saving in assembly costs in the final products . For the foreseeable future , however , it will continue to be necessary to interconnect a number of integrated circuits to make a microcomputer whenever larger amounts of storage or input/output are required.Another major engineering application of microcomputers is in process control. Here the presence of the microcomputer is usually more apparent to the user because provision is normally made for programming the microcomputer for the particular application. In process control applications the benefits lf fitting the entire system on to single chip are usually outweighed by the high design cost involved, because this sort lf equipment is produced in smaller quantities. Moreover, process controllers are usually more complicated so that it is more difficult to make them as single integrated circuits. Two approaches are possible; the controller can be implemented as a general-purpose microcomputer rather like a more robust version lf a hobby computer, or as a ‘packaged’ system, signed for replacing controllers based on older technologies such as electromagnetic relays. In the former case the system would probably be programmed in conventional programming languages such as the ones to9 be introduced later, while in the other case a special-purpose language might be used, for example one which allowed the function of the controller to be described in terms of relay interconnections, In either case programs can be stored in RAM, which allows them to be altered to suit changes in application, but this makes the overall system vulnerable to loss lf power unless batteries are used to ensure continuity of supply. Alternatively programs can be stored in ROM, in which case they virtually become part of the electronic ‘hardware’ and are often referred to as firmware. More sophisticated process controllersrequire minicomputers for their implementation, although the use lf large scale integrated circuits ‘the distinction between mini and microcomputers, Products and process controllers of various kinds represent the majority of present-day microcomputer applications, the exact figures depending on one’s interpretation of the word ‘product’. Virtually all engineering and scientific uses of microcomputers can be assigned to one or other of these categories. But in the system we most study Pressure and Pressure Transmitters. Pressure arises when a force is applied over an area. Provided the force is one Newton and uniformly over the area of one square meters, the pressure has been designated one Pascal. Pressure is a universal processing condition. It is also a condition of life on the planet: we live at the bottom of an atmospheric ocean that extends upward for many miles. This mass of air has weight, and this weight pressing downward causes atmospheric pressure. Water, a fundamental necessity of life, is supplied to most of us under pressure. In the typical process plant, pressure influences boiling point temperatures, condensing point temperatures, process efficiency, costs, and other important factors. The measurement and control of pressure or lack of it-vacuum-in the typical process plant is critical.The working instruments in the plant usually include simple pressure gauges, precision recorders and indicators, and pneumatic and electronic pressure transmitters. A pressure transmitter makes a pressure measurement and generates either a pneumatic or electrical signal output that is proportional to the pressure being sensed.In the process plant, it is impractical to locate the control instruments out in the place near the process. It is also true that most measurements are not easily transmitted from some remote location. Pressure measurement is an exception, but if a high pressure of some dangerous chemical is to be indicated or recorded several hundred feet from the point of measurement, a hazard may be from the pressure or from the chemical carried.To eliminate this problem, a signal transmission system was developed. This system is usually either pneumatic or electrical. And control instruments in one location. This makes it practical for a minimum number of operators to run the plant efficiently.When a pneumatic transmission system is employed, the measurement signal is converted into pneumatic signal by the transmitter scaled from 0 to 100 percent of the measurement value. This transmitter is mounted close to the point of measurement in the process. The transmitter output-air pressure for a pneumatic transmitter-is piped to the recording or control instrument. The standard output range for a pneumatic transmitter is 20 to 100kPa, which is almost universally used.When an electronic pressure transmitter is used, the pressure is converted to electrical signal thatmay be current or voltage. Its standard range is from 4 to 20mA DC for current signal or from 1 to 5V DC for voltage signal. Nowadays, another type of electrical signal, which is becoming common, is the digital or discrete signal. The use of instruments and control systems based on computer or forcing increased use of this type of signal.Sometimes it is important for analysis to obtain the parameters that describe the sensor/transmitter behavior. The gain is fairly simple to obtain once the span is known. Consider an electronic pressure transmitter with a range of 0~600kPa.The gain isdefined as the change in output divided by the change in input. In this case, the output is electrical signal (4~20mA DC) and the input is process pressure (0~600kPa). Thus the gain. Beside we must measure Temperature Temperature measurement is important in industrial control, as direct indications of system or product state and as indirect indications of such factors as reaction rates, energy flow, turbine efficiency, and lubricant quality. Present temperature scales have been in use for about 200 years, the earliest instruments were based on the thermal expansion of gases and liquids. Such filled systems are still employed, although many other types of instruments are available. Representative temperature sensors include: filled thermal systems, liquid-in-glass thermometers, thermocouples, resistance temperature detectors, thermostats, bimetallic devices, optical and radiation pyrometers and temperature-sensitive paints.Advantages of electrical systems include high accuracy and sensitivity, practicality of switching or scanning several measurements points, larger distances possible between measuring elements and controllers, replacement of components(rather than complete system), fast response, and ability to measure higher temperature. Among the electrical temperature sensors, thermocouples and resistance temperature detectors are most widely used.DescriptionThe A T89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactur ed using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPUkPamA kPa mA kPa kPa mA mA Kr 027.0600160600420==--=with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.Function characteristicThe A T89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.Pin DescriptionVCC:Supply voltage.GND:Ground.Port 0:Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance inputs.Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes during Flash programming,and outputs the code bytes during programverification. External pullups are required during programverification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs.When 1s are written to Port 1 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups.Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 2 is an 8-bit bi-directional I/O port with internal pullups.The Port 2 output buffers can sink/source four TTL inputs.When 1s are written to Port 2 pins they are pulled high by the internal pullups and canbe used as inputs. As inputs,Port 2 pins that are externally being pulled low will source current, because of the internal pullups.Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses. In this application, it uses strong internal pullupswhen emitting 1s. During accesses to external data memory that use 8-bit addresses, Port 2 emits the contents of the P2 Special Function Register.Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.Port 3Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/source four TTL inputs.When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:Port 3 also receives some control signals for Flash programming and verification.RSTReset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROGAddress Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming.In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory.If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.PSENProgram Store Enable is the read strobe to external program memory.When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.EA/VPPExternal Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.EA should be strapped to VCC for internal program executions.This pin also receives the 12-volt programming enable voltage(VPP) during Flash programming, for parts that require12-volt VPP.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively,of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1.Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.微型计算机控制系统(单片机控制系统)广义地说,微型计算机控制系统(单片机控制系统)是用于处理信息的,这种被用于处理的信息可以是电话交谈,也可以是仪器的读数或者是一个企业的帐户,但是各种情况下都涉及到相同的主要操作:信息的处理、信息的存储和信息的传递。

单片机控制音乐播放-外文翻译复习课程

单片机控制音乐播放-外文翻译复习课程

单片机控制音乐播放-外文翻译毕业设计(论文)外文翻译题目: __ 单片机控制音乐播放_ __英文题目: Single chip microcomputer to control the music player系 : _ 信息工程系_ __专业: _ _ __ 电子信息工程___ ___班级: ___ _ __ 09电信本________ _学号: ___ _____8110109053___ ______姓名: ________ 张亚峰 ______ _____指导老师: _________王乐平_________ ____填表日期 _ __ ___2012.11.16_____ ____基于51单片机的音乐播放器设计作者:Bob brown 来源:《SCM》摘要:本音乐播放器是利用STC89C51单片机结合内部定时系统及数码管显示设计一个简易的微电脑音乐盒。

本文分析了基于51单片机的音乐播放器的硬件电路和软件的设计的具体过程包括数据处理子程序的设计、显示子程序的设计最后针对仿真过程遇到的现象进行了具体的分析与说明。

关键词:播放;单片机; STC89C51随着人们物质生活水平的提高,人们越来越注重精神生活的满足,热衷于在消费中寻求快乐和娱乐体验。

音乐作为人类娱乐生活的重要组成元素,一直以来都备受关注。

而人类进入工业社会以来,将音乐播放与工业产品结合发展出了一系列的音乐播放产品,并随着技术的革新和消费者需求的变化而不断更新,为人类的娱乐生活提供了时尚便利的道具。

前两年造型时尚、小巧便携、可免费下载歌曲的MP3播放器的流行更是使音乐播放产品空前繁荣。

但是在繁荣过后,主流音乐播放产品MP3播放器在造型和系统的设计上似乎走进了一个瓶颈,新产品和旧产品比起来只是固件上的更新和硬件的更迭,而没有内容和实质的跳跃,因此在同样具有便携性特点和音乐播放功能的音乐手机出现的时候,MP3原有的功能优势不再,市场继而被迅速挤压,地位收到空前的威胁。

单片机外文文献翻译(2024)

单片机外文文献翻译(2024)

引言:单片机(Microcontroller)是一种广泛应用于嵌入式系统中的小型计算机芯片。

它集成了处理器核心、存储器、外设接口和时钟电路等核心部件,可以独立运行。

随着全球化的发展,外文文献对于学习和研究单片机领域来说至关重要。

本文翻译的外文文献《MicrocontrollerbasedTrafficLightControlSystem》详细介绍了基于单片机的交通信号灯控制系统。

概述:交通信号灯控制是现代都市交通系统中至关重要的一环。

传统的交通信号灯控制系统通常由定时器控制,不能根据实际交通情况动态调整信号灯的时间。

而基于单片机的交通信号灯控制系统可以实现根据实时交通流量来动态调整信号灯的时间,优化交通效率。

本文将详细介绍该系统的设计和实现。

正文:一、单片机选型1.1.CPU性能:本文选择了一款高性能的32位单片机作为控制核心,它具有较高的处理能力和较大的存储器容量,可以同时处理多条交通路口的信号控制。

1.2.外设接口:该单片机具有丰富的外设接口,可以与交通信号灯、传感器和通信设备等进行连接,实现信号控制和数据交互。

1.3.低功耗设计:为了节约能源和延长系统寿命,在单片机选型时考虑了低功耗设计,降低系统运行的能耗。

二、硬件设计2.1.交通信号灯:在设计交通信号灯时,考虑了日夜可见性和能耗。

采用了高亮度LED作为信号灯光源,同时添加了光敏传感器控制信号灯的亮度,以满足不同时间段的亮度需求。

2.2.传感器:通过安装车辆感应器和行人感应器等传感器,可以在实时监测交通流量的基础上,智能调整信号灯时间,提高路口的交通效率。

2.3.通信设备:在交通信号灯控制系统中引入了通信设备,可以实现各交通路口之间的信息交互和协调控制,提高整体交通系统的效率。

三、软件设计3.1.程序架构:采用了多任务的实时操作系统,将交通信号灯控制、传感器数据处理和通信设备控制等功能分别封装成不同的任务,实现了系统的高效运行和任务调度。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

毕业设计(论文)外文翻译题目: __ 单片机控制音乐播放_ __英文题目: Single chip microcomputer to control the music player系 : _ 信息工程系_ __专业: _ _ __ 电子信息工程___ ___班级: ___ _ __ 09电信本________ _学号: ___ _____8110109053___ ______姓名: ________ 张亚峰 ______ _____指导老师: _________王乐平_________ ____填表日期 _ __ ___2012.11.16_____ ____基于51单片机的音乐播放器设计作者:Bob brown 来源:《SCM》摘要:本音乐播放器是利用STC89C51单片机结合内部定时系统及数码管显示设计一个简易的微电脑音乐盒。

本文分析了基于51单片机的音乐播放器的硬件电路和软件的设计的具体过程包括数据处理子程序的设计、显示子程序的设计最后针对仿真过程遇到的现象进行了具体的分析与说明。

关键词:播放;单片机; STC89C51随着人们物质生活水平的提高,人们越来越注重精神生活的满足,热衷于在消费中寻求快乐和娱乐体验。

音乐作为人类娱乐生活的重要组成元素,一直以来都备受关注。

而人类进入工业社会以来,将音乐播放与工业产品结合发展出了一系列的音乐播放产品,并随着技术的革新和消费者需求的变化而不断更新,为人类的娱乐生活提供了时尚便利的道具。

前两年造型时尚、小巧便携、可免费下载歌曲的MP3播放器的流行更是使音乐播放产品空前繁荣。

但是在繁荣过后,主流音乐播放产品MP3播放器在造型和系统的设计上似乎走进了一个瓶颈,新产品和旧产品比起来只是固件上的更新和硬件的更迭,而没有内容和实质的跳跃,因此在同样具有便携性特点和音乐播放功能的音乐手机出现的时候,MP3原有的功能优势不再,市场继而被迅速挤压,地位收到空前的威胁。

纵观音乐播放产品的发展史,每一次音乐播放产品的革新都是概念的突破或理念的创新的结果。

如从收音机到唱片机实现了收听方式从“被动收听”到“自主选择”的变革,从唱片机到Walkman实现了固定到便携的飞跃。

因此,如何在理念上、概念上进行创新和突破,找到音乐播放产品的新发展方向,适应消费者的新需求,是目前产品设计师急需解决的问题。

本文首先简单回顾了音乐播放产品发展史,并分析了目前音乐播放产品现状,提出寻找新概念突破点的重要性;其次,通过对当前经济环境和社会群体环境的分析,以及目前音乐产业的发展现状和趋势的分析,从中总结出当前消费者的消费需求趋势;最后,根据总结的消费需求和市场现有的一些音乐播放产品的引导,提出未来音乐播放产品的发展方向以及相应的一些概念设想。

STC89C51单片机设计的一个音乐播放器通过单片机音乐播放器系统设计和研究,对于切实掌握单片机相关知识具有重要的理论和实际意义。

这次课程设计的音乐播放器是软件和硬件的结合,不同音符表现形式就是不同频率地声音。

通STC89C51过单片机产生不同的频率的脉冲信号,通过放大电路,由蜂鸣器放出,就产生了美妙和谐优美动听的乐曲。

根据节拍给出该音阶持续的时间,最终实现播放简单歌曲的功能。

为人们生活的改善提供了可靠,方面,廉价的方法。

单片机STC89C51作为硬件核心控制部件,结合三极管作为放大器,数码管构成典型的显示电路,按键作为输入部分以及其他外围设备组成的音乐播放系统。

根据音乐演奏控制器所要实现的显示与选曲及音乐产生功能原理,系统包括演奏扬声器、选曲、播放和显示几部分。

其中,AGAIN按键具有开启播放曲子和重复播放当前曲子的功能,FORM按键具有播放前一曲的工能,NEXT按键具有播放后一曲的功能,RES键具有播放前一曲的功能。

所设计音乐播放器可以播放多首音乐,曲目选择可以由键盘控制,并通过显示器使其显示歌曲序号。

设计的音乐演奏控制器是通过控制单片机内部的定时器来产生不同频率的方波,驱动喇叭发出不同音节的声音,再利用延迟来控制发音时间的长短,即控制音调中的节拍。

同时设置按钮使所设计的程序能在三到四首歌曲之间进行选曲,设计显示器使其显示歌曲序号。

与传统的机械式音乐盒相比更小巧,音质更优美且能演奏和弦音乐。

电子式音乐盒动力来源是电池,制作工艺简单,可进行批量生产,所以价格便宜。

基于单片机制作的电子式音乐盒,控制功能强大,可根据需要选歌,使用方便。

根据存储容量的大小,可以尽可能多的存储歌曲。

另外,可以设计彩灯外观效果,使音乐盒的功能更加丰富。

本设计是以STC89C51芯片的电路为基础,外部加上放音设备,以此来实现音乐演奏控制器的硬件电路,通过软件程序来控制单片机内部的定时器使其演奏出优美动听的音乐。

用户可以按照自己的喜好选择音乐并将其转化成机器码存入单片机的存储器中。

对于不同型号的单片机只需要相应的改变一下地址即可。

该软、硬件系统具有很好的通用性,很高的实际使用价值,为广大的单片机和音乐爱好者提供了很好的借鉴。

利用按键切换演奏出不同的乐曲。

扬声器发出乐曲,使用5个按键,两个用来切换歌曲,一个用来启动,一个用来停止,另一个是复位。

用protel 99se设计电路图。

歌曲可以自己随意的写进音乐盒中。

由于歌曲的内存比较大,单片机内存小,将两块单片机一同使用,两者可以通讯。

数码管显示当前播放的是哪一首歌曲。

经图表、致谢及参考文献已略去(见原文)。

Author: Bob brown sources: the SCM"Abstract: the music player is to use STC89C51 SCM combining internal timing system and digital tube display design a simple microcomputer music box. This paper analyzes the music player based on 51 single chip hardware circuit and software design of the specific process including data processing procedure design, display subroutine design finally based on the simulation process meet phenomenon was carried on the concrete analysis and description.Keywords: player; SCM; STC89C51Along with the horizontal exaltation in people physical life, people pay more and more attention to the spiritual life satisfaction, keen to seek happiness in consumption and entertainment experience. Music as a human entertainment life important elements, has been all concern. But humans into the industrial society since, will music play and industrial products combined with developed a series of music play products, and with the innovation of technology and customers' demands change constantly updated, for human entertainment life provides fashion convenience items. Before two years fashion modeling, small portable, free download songs popular MP3 player is to make music play product unprecedented prosperity. But in the prosperity, the mainstream music play products MP3 player in the model and the design of the system seems to be into a bottleneck, new products and old products than just the firmware update and hardware alternating, and no content and essence of the jump, therefore in the same with portable sexual characteristics and music play function of music cell phone appeared, MP3 original functional advantages of no longer, the market and then be quickly extrusion, status, received an unprecedented threat. Throughout the history of music play products, and each time the music play product innovations are concept breakthrough or the idea of the result of innovation. As from the radio to record machine realized the listening mode from "passive listening to" to "independent choice" change, from record machine to realize the Walkman fixed to a portable leap. Therefore, how to in concept, the concept of innovation and breakthrough, find the music play products new development direction, to adapt to the new demand of consumers, it is current product designers urgent need to resolve problems. Firstly, this paper reviews the history of music play products, and analysis of the current music play product situation, this paper proposes a new concept for the importance of breakthrough point; Secondly, based on the current economic environment and social group environment analysis, as well as the music industry development present situation and trend analysis, it sums up the current consumer demand trend; Finally, according to the summary of the consumption demand and market some existing music play product guidance, puts forward the future music play product the development direction and the corresponding some idea concept.STC89C51 microcontroller design a music player through the single chip microcomputer music player system design and research, to be mastered SCM related knowledge is of important theoretical and practical significance. The curriculum design of the music player is the combination of software and hardware, different notes form of expression is different frequency to voice. Through a single chip microcomputerSTC89C51 produce different frequency pulse signal, through the amplification circuit, by the buzzer release, he produced a wonderful harmony beautiful moving music. According to the rhythm of the scale is given for time, finally realizes the function of play simple songs. For better life for the people provides reliable, respect, cheap method.STC89C51 single-chip microcomputer as core hardware control unit, combined with triode as amplifier, digital tube constitute a typical display circuit, key as input part and other peripheral equipment composition of music broadcast system. According to the music playing controller to achieve the display and selects and music produce function principle, system including play speaker, selects, played and display a few parts. Among them, the button AGAIN with open play tunes and repeat play the tune function, FORM key has played a song before work can, NEXT button has played a song after the function, RES key has played before the function of a song. The design music player can play many first music, songs can choose by the keyboard control, and through the display make its display songs serial number. Design of the music playing controller is through the control of single chip microcomputer internal timer to produce different frequency square wave, drive speaker different syllable voice, and then delay to control the length of time the pronunciation, i.e., the controlling tone of the beat. At the same time set button to make the design process can be in three to four songs between performers, design display make its display songs serial number. With the traditional mechanical music box than smaller, more beautiful timbre and can play chord music. Electronic music box is the source of power batteries, simple manufacturing process, can be conducted batch production, so cheap. Based on SCM make electronic music box, control powerful, can according to need to choose songs, easy to use. According to the size of the storage capacity, can be as many store songs. In addition, can design lights appearance effect, make the music box function more rich.This design is STC89C51 chip circuit as the foundation, external and playback equipment, so as to realize music playing controller hardware circuit, through the software program to control the MCU internal timer make it play beautiful moving music. The user can choose according to oneself be fond of music and translate into machine code in SCM storage. For different types of single chip microcomputer only need the corresponding change of address can. The software and hardware system has the very good generality and high practical value in use, for the majority of SCM and music lovers to provide a good reference. Using key switch to play out different music. The speaker sends out the music, the use of five key, two used to switch song, a used to start, a used to stop, the other is areset. With protel 99 se to design the circuit diagram. Song can optional written into music box. Due to the songs of memory is bigger, single-chip microcomputer memory small, will be two pieces of MCU used together, both can communication. Digital tube display the current broadcast is which song.The chart, acknowledgments and reference documents have lost (see the original).。

相关文档
最新文档