课程设计单片机原理公交车语音报站系统设计.doc

上传人:文库蛋蛋多 文档编号:4150498 上传时间:2023-04-07 格式:DOC 页数:14 大小:830KB
返回 下载 相关 举报
课程设计单片机原理公交车语音报站系统设计.doc_第1页
第1页 / 共14页
课程设计单片机原理公交车语音报站系统设计.doc_第2页
第2页 / 共14页
课程设计单片机原理公交车语音报站系统设计.doc_第3页
第3页 / 共14页
课程设计单片机原理公交车语音报站系统设计.doc_第4页
第4页 / 共14页
课程设计单片机原理公交车语音报站系统设计.doc_第5页
第5页 / 共14页
点击查看更多>>
资源描述

《课程设计单片机原理公交车语音报站系统设计.doc》由会员分享,可在线阅读,更多相关《课程设计单片机原理公交车语音报站系统设计.doc(14页珍藏版)》请在三一办公上搜索。

1、单片机原理课程设计公交车语音报站系统设计班级:学号:姓名:同组:日期:一 工作原理1. 人类语音基本概念语音即语言的声音,是语言符号系统的载体。它由人的发音器官发出,负载着一定的语言意义。语言依靠语音实现它的社会功能。语言是音义结合的符号系统,语言的声音和语言的意义是紧密联系着的,因此,语言虽是一种声音,但又与一般的声音有着本质的区别 语音是人类发音器官发出的具有区别意义功能的声音,不能把语音看成纯粹的自然物质;语音是最直接地记录思维活动的符号体系,是语言交际工具的声音形式。 语音的物理基础主要有音高、音强、音长、音色,这也是构成语音的四要素。音高指声波频率,即每秒钟振动次数的多少;音强指声波

2、振幅的大小;音长指声波振动持续时间的长短,也称为时长;音色指声音的特色和本质,也称作音质。人对声音的感觉有一定频率范围,大约每秒钟振动20次到20000次范围内,即频率范围是20Hz-20000Hz,如果物体振动频率低于20Hz或高于20000Hz人耳就听不到了,高于20000Hz的频率就叫做超声波,而低于20Hz的频率就叫做次声波。所以说不是所有物体的振动所发出的声音我们都能听到的。另外要能听到声音也必须有传播声音的介质。2. 录音、放音基本原理: ISD1420语音芯片内部结构框图 前置放大器对通过麦克风送入的语音信号进行放大,并受自动增益电路AGC控制,保证输入信号大小变化时不失真。前置

3、放大器输出的信号可通过电容耦合送入信号放大器,也可通过电容耦合直接输入其他模拟信号,如录音机等的线路输出,输入信号典型值为50mv(峰值)。 信号放大器输出送入滤波器,在采样时钟和模拟收发器控制下进行比较采样,存入不易失真模拟存贮器单元。(录音) 录入信号输出经滤波器,输出放大器送到扬声器引脚SP+、SP-,从而完成语音的重放。(放音) 地址线经缓存器、译码器控制管理存储单元,控制逻辑控制芯片的录、放和触发控制以及输出指示等。 内部时钟及定时器、采样时钟为采样等提供时钟脉冲信号。3. 基本设计思想:(1) 手动控制方式,通过B1区按键REC录制四个站的站名,通过按键PLAY、PLAYL放音(2

4、)MCU控制方式,通过G6区8个按键控制录放音:1-4号键录制每个站站名各5秒;然后通过5-8号键分别放出,放音内容分别对应1-4号键录制的四个站站名。 二硬件电路设计 1. 主要部件的选用及工作原理 ISD1420 语音存储模块 IISD1420 封装引脚步图电源(VCCA,VCCD)芯片内部的模拟和数字电路使用不同的电源总线,并且分别引到外封装上, 这样可使噪声最小。模拟和数字电源端最好分别走线,尽可能在靠近供电端处相连,而去耦电 容应量靠近芯片。 地线(VSSA,VSSD)芯片内部的模拟和数字电路也使用不同的地线,这两个脚最好在引脚焊盘上 相连。录音(/REC)低电平有效。只要/REC

5、变低(不管芯片处在节电状态还是正在放音),芯片即开始录 音。录音期间,/REC 必须保持为低。/REC 变高或内存录满后,录音周期结束,芯片自动写入一个信息结束标志(EOM),使以后的重放操作可发及时停止。之后芯片自动进入节电状态。 注:/REC 的上升沿有 50 毫秒防颤,防止芯片自动进入节电状态。边沿触发放音(/PLAYE)此端出现下降沿时,芯片开始放音。放音持续到EOM 标志或内存结束,之后芯片自动进入节电状态。开始放音后,可以释放/PLAYE。电平触发放音(/PLAYL)此端出现下降沿时,芯片开始放音。放音持续至端回到高电平,遇到 EOM 标志,或内存结束。放音结束后芯片自动进入节电状

6、态。 注:放音过程中当遇到 EOM 或内存结束时,如果/PLAYE 或/PLAYL 仍处在高电平,芯片虽然也进入节电状态(内部震荡器和时钟停止工作),但是由于芯片没有对/PLAYE 和/PLAYL 的上升沿进行消颤,随后在这两个引脚 上出现的下隆沿(例如释放按键时的抖动)都会触发放音。录音指示(/RECLED)处于录音状态时,此端为低,可驱动LED。此外,放音遇到EOM 标志时,此端输出低电平脉冲。话筒输入(MIC)此端边至片内前置放大器。片内自动增益控制电路(AGC)将前置增益控制在-15至24dB。外接话筒应通过串联电容耦合到此端。耦合电容值和此端的10K输入阻抗决定了芯 片频带的低频截止

7、点。话筒参考(MIC REF)此端是前置放大器的反向输入。当以差分形式连接话筒时,可减小噪声,提高共模抑制比。自动增益控制(AGC)AGC 动态调节器整前置境益以补偿话筒输入电平的宽幅变化,使得录制变 化很大的音量(从耳语到喧哗嚣声)时失真都能保持最小。响应时间取决于此端的 5K输入阻抗和外接的对地电容(即线路图中的 C6)的时间常数。释放时间取决于此端外接的并联对地电容和电阻(即线路图中R5和C6)的时间常数。470K和4.7uF 的标称值在绝对大多数场合下可获得满意的效果。模拟输出(ANA OUT)前置放大器输出。前置电压增益取决于AGC端的电平。模拟输入(ANA IN)此端即芯片录音的输

8、入信号。对话筒输入来说,ANA OUT 端应通过外接电容连至本端。该电容和本端的 3K输入阻抗给出了芯片频带的附加低端截止频率。其它音源可通过交流耦合直接连至本端。喇叭输出(SP+、SP-)这对输出端能驱动16以上的喇叭。单端使用时必须在输出端和喇叭间接 耦合电容,而双端输出既不用电容又能将功率提高4倍。录音时,它们都呈高阻态;节电模式下,它们保持为低电平。外部时钟(XCLK)此端内部有下拉元件,不用时应接地。芯片内部的采样时钟在出厂前已调校, 保证了标称的最小录音时间。商业级芯片在整个温度各电压范围内,频率变化在+2.25%内,并保 证最小录放时间,所以有些芯片的录放时间比标称的值稍大。工业

9、级芯片在整个温度和电压范 围内, 频率变化在+5%内,建议使用稳压电源。若要求更高精度或系统同步,可从本端输入外 部时钟,频率如表 2-1“外部钟频”所示。由于内部的防混淆及平滑滤波器已设定,帮上述持 荐的时钟频率不应改变。输入时钟的占空比无关紧要,因为内部首先进行了分频。地址(A0 A7)地址端有两个作用,取决于最高(MSB)两位 A7、A6 的状态。当 A7或 A6有一个 为0时,所有输入均释放为地址位,作为当前录放操作的起始地址。地址端只用输入,不输出 操作过程的内部地址信息。地址在/PLAYE、/PLAYL、或/REC 的下降沿锁存。2. 电路图 三汇编语言程序设计1. 程序流程图开始

10、计数判定手动/自动按钮是否按下返回返回返回返回调用手动操作程序YN调用语音报站程序送录音地址开始开始开始开始录音送录音控制字判断执行键是否按下返回NY开始送放音地址送放音控制字开始放音 返回2. 汇编语言设计NAMEISD1420;语音模块操作子程序PUBLICISD_INIT,ISD_MODE,ISD_REC,ISD_PLAY,ISD_STOP;ISD1420连接设置REC BITP3.2;录音接口PLAYEBITP3.3;电平触发放音接口PLAYLBITP3.4;边沿触发放音接口ISDCOMMXDATA0F000H;录放音地址/操作模式输入地址,0F000H是接到CS1上的地址ISD142

11、0_CODE SEGMENT CODERSEG ISD1420_CODE;录音子程序;A-存放操作方式设置值,R7-录几秒ISD_INIT:SETBREC;语音模块初始化,关闭录放音功能 SETBPLAYE SETBPLAYL MOVDPTR,#ISDCOMM CLRA MOVXDPTR,A;允许手动录放音,当A6,A7为高时,无法手动放音 RET;操作模式,A-操作模式设置值ISD_MODE:PUSHACC LCALLISD_STOP;语音模块初始化,将REC,PLAYE,PLAYL置位,并设置操作模式 MOV DPTR,#ISDCOMM;设置操作模式:分段录音 POP ACC MOVXDP

12、TR,A;设置操作模式命令在A中 CLR PLAYL;给一个上升沿,锁存命令 NOP NOP NOP SETBPLAYL RET;录音ISD_REC:MOVDPTR,#ISDCOMM;设置录音起始地址 MOVXDPTR,A CLR REC;REC变低,即开始录音 RET;放音子程序;A-放哪段音ISD_PLAY:PUSHACC CALLISD_STOP;暂停之前的录放音操作 POP ACC MOVDPTR,#ISDCOMM;设置放音起始地址 MOVXDPTR,A CLR PLAYE;开始放音,边沿放音模式 NOP SETBPLAYE RET;停止录放音ISD_STOP:CLR PLAYL;一个

13、负脉冲停止放音 NOP SETBPLAYL LCALLDelay50ms SETBREC;关闭所有操作指令 SETBPLAYE MOVDPTR,#ISDCOMM CLR A MOVXDPTR,A;允许手动录放音,当A6,A7为高时,无法手动放音 RET;延时Delay50ms:PUSH06H PUSH07H MOVR6,#100Delay50ms_1:MOVR7,#200 DJNZR7,$ DJNZR6,Delay50ms_1 POP 07H POP 06H RETMAIN_CODE SEGMENTCODESTACK SEGMENTIDATA;ISD1420ISD1420_AD1EQU00H;

14、1号键录放音起始地址,每次录音5sISD1420_AD2EQU10H;2号键录放音起始地址ISD1420_AD3EQU20H;3号键录放音起始地址ISD1420_AD4EQU25H;4号键录放音起始地址RSEG STACK DS 20H ;32 Bytes StackCSEG AT 0000H;定位0 LJMPSTARTRSEG MAIN_CODE;开始程序段START: MOVSP,#STACK-1 LCALLMainInit;主程序初始化Main: LCALLScanKey;扫描按键 JNC MainMain1: LCALLKeyRun;按键处理 JNB F0,Main;是否有新的键按下

15、CLR F0;清按键标志 SJMPMain1 JMP MAIN;循环进行实验内容介绍与ISD1420功能测试;主程序初始化MainInit: CLR F0;有键按下标志位,清0-无键按下 MOVP1,#0FFH LCALLISD_INIT;ISD1420初始化 RET;*;录放音子程序;*KEY1: MOVA,#ISD1420_AD1;录音首地址 LJMPKEY_RECKEY2:MOVA,#ISD1420_AD2 LJMPKEY_RECKEY3:MOVA,#ISD1420_AD3 LJMPKEY_RECKEY4:MOVA,#ISD1420_AD4 LJMPKEY_RECKEY_REC: MOV

16、 R7, #20;录音时间长度,5s LCALLISD_REC;调用录音子程序KEY_REC1:LCALLDelay_025S;延时 JB F0,KEY_REC2;检测按键是否有键按下 DJNZR7,KEY_REC1;录音时间,根据R7的值决定 LCALLISD_STOP;停止录音KEY_REC2:RET;放音子程序KEY5:MOVA,#ISD1420_AD1;放音首地址 LJMPKEY_PLAYKEY6:MOVA,#ISD1420_AD2 LJMPKEY_PLAYKEY7:MOVA,#ISD1420_AD3 LJMPKEY_PLAYKEY8:MOVA,#ISD1420_AD4 LJMPKEY

17、_PLAYKEY_PLAY:MOVR7,#20 LCALLISD_PLAY;调用录用子程序KEY_PLAY1:LCALLDelay_025S ;用于进度显示的时间参照 JB F0,KEY_PLAY2;检测按键是否有键按下 DJNZR7,KEY_PLAY1KEY_PLAY2:RETKeyRun:MOVDPTR,#KeyTab;有键按下,跳到相应处理程序 MOVA,B RL A JMPA+DPTRKeyTab:SJMPKEY1 ;1-4号键,分别各录音5秒,ISD1420可录音20秒 SJMPKEY2 SJMPKEY3 SJMPKEY4 SJMPKEY5 ;5-8号键,对应分别放音各5秒 SJMP

18、KEY6 SJMPKEY7 SJMPKEY8;按键扫描ScanKey: MOVA,P1;键扫描 CJNEA,#0FFH,ScanKey1ScanKey4:CLRC RETScanKey1:ACALLScanKey2 JNC ScanKey4ScanKey3:MOVB,A ACALLDelay20ms;消抖动 ACALLDelay20ms ACALLScanKey2 JNC ScanKey4 CJNEA,B,ScanKey3ScanKey5:MOVA,P1 CJNEA,#0FFH,ScanKey5 SETBC RETScanKey2:CLR A JNB P1.0,ScanKey21 INC A

19、JNB P1.1,ScanKey21 INC A JNB P1.2,ScanKey21 INC A JNB P1.3,ScanKey21 INC A JNB P1.4,ScanKey21 INC A JNB P1.5,ScanKey21 INC A JNB P1.6,ScanKey21 INC A JNB P1.7,ScanKey21 CLR C RET待添加的隐藏文字内容3ScanKey21:SETBC RETDelay20ms:MOVR6,#10Delay1:MOVR7,#100 DJNZR7,$ DJNZR6,Delay1 RET;延时0.25sDelay_025S:PUSH05H PU

20、SH06H PUSH07H MOVR5,#6DL1S_1:MOVR6,#100DL1S_2:MOVR7,#200 DJNZR7,$ DJNZR6,DL1S_2 DJNZR5,DL1S_1 ACALLScanKey JNC DL1S_3 SETBF0;F0有键按下标志,F0=1,有键按下DL1S_3:POP 07H POP 06H POP 05H RET END四结束语作为一名电气自动化专业的大二学生,我觉得做课程设计是十分有意义的,而且是十分必要的。在已度过的大学时间里,我们大多数接触的是专业课。我们在课堂上掌握的仅仅是专业课的理论知识,如何去锻炼我们的实践能力?如何把我们所学的专业基础课理论

21、知识运用到实践中去呢?我想这次的课程设计对我们就是一种很好的锻炼。在做本次课程设计的过程中,我感触最深的当属查阅大量的设计资料了。在设计中,由于语音存储模块的存储空间有限,使四个站录音放音时间很短和分配不均,我们通过修改录音放音的起始地址,解决了分配不均的问题,至于录放音的时间与ISD1420语音模块的存储空间有关,所以没有延长其时间。其次,在这次课程设计中,我们运用到了以前所学的专业课知识,如:Protel画图、模拟数字电路知识等。虽然过去从未独立应用过它们,但在学习的过程中带着问题去学我发现效率很高,这是我做这次课程设计的又一收获。这次课程设计终于完成了,整个设计我基本上还满意,由于水平有

22、限,难免有错误,还望老师批评指正。希望答辩时,老师多提问些问题,由此我可以更好地了解到自己的不足,以便课后加以补偿,同时也对给过我帮助的所有同学和各位指导老师表示衷心的感谢!五 参考文献1 李全利.单片机原理及应用技术M.北京:高等教育出版社,20092 闫飞.用ISD1420P制作语音自动播放器J.北京:电子报,2002年4月21日第12版3 胡宴如,耿苏燕.模拟电子技术基础M.北京:高等教育出版社,2008 4 陈洪财.单片机C语言和汇编语言实用开发技术M.哈尔滨工业出版社,2008 5 柳春锋.Protel99SE实用教程M.北京:高等教育出版社,20076 杨志忠.数字电子技术M.北京

23、:高等教育出版社,20087 李学海.PIC单片机实用教程提高篇M. 北京航空航海大学出版社,2007Employment tribunals sort out disagreements between employers and employees.You may need to make a claim to an employment tribunal if: you dont agree with the disciplinary action your employer has taken against you your employer dismisses you and yo

24、u think that you have been dismissed unfairly.For more information about dismissal and unfair dismissal, seeDismissal.You can make a claim to an employment tribunal, even if you haventappealedagainst the disciplinary action your employer has taken against you. However, if you win your case, the trib

25、unal may reduce any compensation awarded to you as a result of your failure to appeal.Remember that in most cases you must make an application to an employment tribunal within three months of the date when the event you are complaining about happened. If your application is received after this time

26、limit, the tribunal will not usually accept it.If you are worried about how the time limits apply to you, take advice from one of the organisations listed underFurther help.Employment tribunals are less formal than some other courts, but it is still a legal process and you will need to give evidence

27、 under an oath or affirmation.Most people find making a claim to an employment tribunal challenging. If you are thinking about making a claim to an employment tribunal, you should get help straight away from one of the organisations listed underFurther help.If you are being represented by a solicito

28、r at the tribunal, they may ask you to sign an agreement where you pay their fee out of your compensation if you win the case. This is known as adamages-based agreement. In England and Wales, your solicitor cant charge you more than 35% of your compensation if you win the case.If you are thinking ab

29、out signing up for a damages-based agreement, you should make sure youre clear about the terms of the agreement. It might be best to get advice from an experienced adviser, for example, at a Citizens Advice Bureau. To find your nearest CAB, including those that give advice by e-mail, click onnearest

30、 CAB.For more information about making a claim to an employment tribunal, seeEmployment tribunals.The (lack of) air up there Watch mCayman Islands-based Webb, the head of Fifas anti-racism taskforce, is in London for the Football Associations 150th anniversary celebrations and will attend Citys Prem

31、ier League match at Chelsea on Sunday.I am going to be at the match tomorrow and I have asked to meet Yaya Toure, he told BBC Sport.For me its about how he felt and I would like to speak to him first to find out what his experience was.Uefa hasopened disciplinary proceedings against CSKAfor the raci

32、st behaviour of their fans duringCitys 2-1 win.Michel Platini, president of European footballs governing body, has also ordered an immediate investigation into the referees actions.CSKA said they were surprised and disappointed by Toures complaint. In a statement the Russian side added: We found no

33、racist insults from fans of CSKA.Age has reached the end of the beginning of a word. May be guilty in his seems to passing a lot of different life became the appearance of the same day; May be back in the past, to oneself the paranoid weird belief disillusionment, these days, my mind has been very m

34、essy, in my mind constantly. Always feel oneself should go to do something, or write something. Twenty years of life trajectory deeply shallow, suddenly feel something, do it.一字开头的年龄已经到了尾声。或许是愧疚于自己似乎把转瞬即逝的很多个不同的日子过成了同一天的样子;或许是追溯过去,对自己那些近乎偏执的怪异信念的醒悟,这些天以来,思绪一直很凌乱,在脑海中不断纠缠。总觉得自己自己似乎应该去做点什么,或者写点什么。二十年的

35、人生轨迹深深浅浅,突然就感觉到有些事情,非做不可了。The end of our life, and can meet many things really do?而穷尽我们的一生,又能遇到多少事情是真正地非做不可?During my childhood, think lucky money and new clothes are necessary for New Year, but as the advance of the age, will be more and more found that those things are optional; Junior high school

36、, thought to have a crush on just means that the real growth, but over the past three years later, his writing of alumni in peace, suddenly found that isnt really grow up, it seems is not so important; Then in high school, think dont want to give vent to out your inner voice can be in the high schoo

37、l children of the feelings in a period, but was eventually infarction when graduation party in the throat, later again stood on the pitch he has sweat profusely, looked at his thrown a basketball hoops, suddenly found himself has already cant remember his appearance.童年时,觉得压岁钱和新衣服是过年必备,但是随着年龄的推进,会越来越

38、发现,那些东西根本就可有可无;初中时,以为要有一场暗恋才意味着真正的成长,但三年过去后,自己心平气和的写同学录的时候,突然就发现是不是真正的成长了,好像并没有那么重要了;然后到了高中,觉得非要吐露出自己的心声才能为高中生涯里的懵懂情愫划上一个句点,但毕业晚会的时候最终还是被梗塞在了咽喉,后来再次站在他曾经挥汗如雨的球场,看着他投过篮球的球框时,突然间发现自己已经想不起他的容颜。Originally, this world, can produce a chemical reaction to an event, in addition to resolutely, have to do, an

39、d time.原来,这个世界上,对某个事件能产生化学反应的,除了非做不可的坚决,还有,时间。A persons time, your ideas are always special to clear. Want, want, line is clear, as if nothing could shake his. Also once seemed to be determined to do something, but more often is he backed out at last. Dislike his cowardice, finally found that there

40、are a lot of love, there are a lot of miss, like shadow really have been doomed. Those who do, just green years oneself give oneself an arm injection, or is a self-righteous spiritual.一个人的时候,自己的想法总是特别地清晰。想要的,不想要的,界限明确,好像没有什么可以撼动自己。也曾经好像已经下定了决心去做某件事,但更多的时候是最后又打起了退堂鼓。嫌恶过自己的怯懦,最终却发现有很多缘分,有很多错过,好像冥冥之中真的

41、已经注定。那些曾经所谓的非做不可,只是青葱年华里自己给自己注射的一支强心剂,或者说,是自以为是的精神寄托罢了。At the moment, the sky is dark, the air is fresh factor after just rained. Suddenly thought of blue plaid shirt; Those were broken into various shapes of stationery; From the corner at the beginning of deep friendship; Have declared the end of t

42、he encounter that havent start planning. Those years, those days of do, finally, like youth, will end in our life.此刻,天空是阴暗的,空气里有着刚下过雨之后的清新因子。突然想到那件蓝格子衬衫;那些被折成各种各样形状的信纸;那段从街角深巷伊始的友谊;还有那场还没有开始就宣告了终结的邂逅计划那些年那些天的非做不可,终于和青春一样,都将在我们的人生中谢幕。Baumgartner the disappointing news: Mission aborted. r plays an important role in this mission. Starting at the ground, conditions have to be very calm - winds less than 2 mph, with no precipitation or humidity and l

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 办公文档 > 其他范文


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号