作业帮 > 综合 > 作业

英语翻译3 软件部分的设计本设计是制作一个具有语音报时的时钟系统,它利用凌阳A61单片机的2Hz时基信号计时进行年历计算

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/05/12 09:10:53
英语翻译
3 软件部分的设计
本设计是制作一个具有语音报时的时钟系统,它利用凌阳A61单片机的2Hz时基信号计时进行年历计算,用凌阳A61单片机的语音功能将当前时间报出来,并在LCD上显示.整个程序分为主程序、万年历计算子程序、校时子程序、键盘扫描子程序、播放语音子程序、LCD液晶显示子程序几部分.
3.1 主程序流程及其算法
语音时钟的主程序按照模块化设计,所有功能都可以通过调用子程序完成,主程序较简单,流程见图.凌阳A61单片机具有低功耗的睡眠模式,在睡眠模式下功耗电流可以降到2μA,这对于用电池供电的系统非常重要,睡眠模式可以通过按键中断唤醒.
3.2 万年历计算子程序设计
在万年历的计算中,我们是利用2Hz中断做时钟源进行计时的.由于周期是频率的倒数,因此每半秒中断一次.当每两次中断秒就加1,并进行年历计算.在进行年历计算时,有平闰年计算问题和月天数是30天还是31天的问题.闰年的条件是:能被400整除,或者能被4整除,但不能被100整除
3.3 键盘扫描子程序的设定
在键盘扫描过程中必须解决好按键消抖的问题.由于机械触点的弹性作用,通常按键在按下和释放时都存在一个抖动的暂态过程.这种抖动的暂态过程大约经过5~10ms的时间,人的肉眼是察觉不到的,但对高速的CPU是有反应的,可能产生误处理.为了保证键动作一次,仅进行一次处理,必须采取措施以消除抖动.我在设计中采用软件的方式来消除抖动.软件消除抖动是用延时来避开暂态抖动过程,即检测到按键闭合后执行一个延时程序,产生一个延时时间,让前沿抖动消失后再检测一次键的状态,如果仍然保持闭合状态,则确认真正有键按下.当检测到按键释放后,也要给出一个延时时间,待后沿抖动消失后才转入该键的处理程序
3.4 校时子程序的设计
系统扩展了四个按键,KEY1键用于报时,由于时间包括年、月、日和时、分、秒,按一次KEY1键,则报年、月、日,再按一次KEY2键则报时、分.当按住KEY3键时进入时间校正状态,语音播报当前是XXXX年,按KEY1键年份增加,按KEY2键年份减少;按KEY2键来切换月、日、时、分,调整完分后,按KEY3键确认,语音报出年、月、日、时、分.
3.5 语音播报部分的设计
报时用SACM-A2000播放.(见附录)
3.6 LCD液晶显示部分的设计
调用液晶显示子程序时,要设定好每行显示的起始位置.LCD12864字符型液晶模块是两行显示,第一行显示年、月、日,起始地址为0x0080.第二行显示时、分、秒,起始地址为0x00c0.(见附录)
3 software design
This design is to produce a voice-time clock system,which uses Sunplus 2Hz SCM A61 signal time-base for calendar time,the A61 MCU with Sunplus voice out at the current time and the LCD显示.The whole process is divided into the main program,calendar calculation subroutine,school routines,keyboard scan subroutine,subroutines voice playback,LCD liquid crystal display parts subroutine.
3.1 The main program processes and algorithms
Voice of the main clock in accordance with the modular design,all functions can be completed by calling the subroutine,main program relatively simple,see the process.Sunplus has the A61 single-chip low-power sleep mode,power consumption in sleep mode current can be reduced to 2μA,which use battery-powered system is very important,sleep mode wake-up call can be interrupted through the keys.
3.2 Design of calendar calculation subroutine
Calculation of the calendar,we have to do is to use 2Hz interrupt timing source clock.As the cycle is the reciprocal of frequency,each time half a second interruption.When interrupted every two seconds plus 1,and the calendar calculation.In calculating the calendar,it is flat on a leap year and calculated the number of days is 30 days or 31 days of the issue.Leap year terms are:to be divisible by 400,or can be divisible by 4 but not divisible by 100
3.3 Subroutine keyboard scan settings
In the course of the keyboard scan buttons eliminate the need to solve the problem of shaking.Due to the flexibility of the role of mechanical contact,usually in the press and release button when there is a transient process of jitter.This jitter transient process after about 5 10ms of time,people are not aware that the naked eye,but the CPU for high-speed response is likely to produce the error handling.In order to ensure a key action,only a treatment,must take measures to eliminate jitter.I use the software in the design approach to the elimination of jitter.Software elimination of delay jitter is to avoid jitter transient process,that is,to detect a key closure delay after the implementation of procedures,resulting in a delay time,so that after the detection of the disappearance of leading-edge jitter of the state of a key,if the state remained closed ,then press the button to confirm genuine.When the release button is detected,it should give a delay time until after the disappearance of edge jitter into the key process
Subprogram 3.4 design school
Extension of the four keys,KEY1 button for time,because of the time,including year,month,day and hour,minute,second,according to a key KEY1,then at year,month,day,and then the time a key KEY2,sub - .When holding down the enter key KEY3 time correction,and voice broadcast is XXXX the current year by year increase in key KEY1,KEY2 by reducing the year button; KEY2 button to switch by months,days,hours,minutes,adjusting the end points,press KEY3 button to confirm,voice reported year,month,day,hour,minute.
3.5 Voice broadcast part of the design
SACM-A2000 Time to play with.(See appendix)
3.6 LCD liquid crystal display part of the design
Liquid crystal display subroutine call,it is necessary to set each line shows the initial position.Character LCD module is LCD12864 two lines show that the first line shows year,month,day,start address is 0x0080.The second line shows hours,minutes,seconds,the start address is 0x00c0.(See appendix)
英语翻译3 软件部分的设计本设计是制作一个具有语音报时的时钟系统,它利用凌阳A61单片机的2Hz时基信号计时进行年历计算 英语翻译本系统设计了一个基于AT89S52单片机控制的语音播报数字多用表.它是一种价格便宜和操作简单、自动显示和播报测量 基于MCS-51单片机的数字时钟系统设计 翻译"基于MCS-51单片机的数字时钟系统设计" 英语翻译语音播放万用表测量数值的结果直观、准确、方便,具有一定的实际意义.本设计是采用SPCE061A单片机作为控制芯片 英语翻译本毕业设计主要设计以单片机AT89C52为控制核心,对输入信号的频率进行测量的一种数字频率计.设计的频率计测量范 汉译英 本系统设计了一个基于AT89S52单片机控制的语音播报数字多用表.要求能够准确测量一定范围内的电阻、电容、电感、 英语翻译本文是利用FPGA芯片EP2C5T144设计等精度频率计,系统主要分为:软件部分和硬件部分.频率计的大部分功能由 英语翻译摘要:本设计是用中小规模集成电路设计一个公用电话计时系统.通过本设计使其完成一下几项基本功能:每 3 分钟计时一 英语翻译本课题主要设计的带温度检测的数字时钟是由中央控制器、温度检测器、时钟系统、提示系统、显示器和按键组成.中央控制器 用【Matlab】设计一个去除30Hz信号中50Hz的信号的小程序. 英语翻译设计使用MATLAB软件,利用一周期m序列对一定周期的方波信号进行了仿真和分析.从扩频通信系统的组成原理及特点、