基于单片机的电子万年历设计 外文翻译.docx

上传人:b****5 文档编号:5764448 上传时间:2023-01-01 格式:DOCX 页数:7 大小:48.97KB
下载 相关 举报
基于单片机的电子万年历设计 外文翻译.docx_第1页
第1页 / 共7页
基于单片机的电子万年历设计 外文翻译.docx_第2页
第2页 / 共7页
基于单片机的电子万年历设计 外文翻译.docx_第3页
第3页 / 共7页
基于单片机的电子万年历设计 外文翻译.docx_第4页
第4页 / 共7页
基于单片机的电子万年历设计 外文翻译.docx_第5页
第5页 / 共7页
点击查看更多>>
下载资源
资源描述

基于单片机的电子万年历设计 外文翻译.docx

《基于单片机的电子万年历设计 外文翻译.docx》由会员分享,可在线阅读,更多相关《基于单片机的电子万年历设计 外文翻译.docx(7页珍藏版)》请在冰豆网上搜索。

基于单片机的电子万年历设计 外文翻译.docx

基于单片机的电子万年历设计外文翻译

 

毕业设计(论文)

外文文献翻译

题目:

IIR数字滤波器的设计研究和MATLAB仿真

 

学院:

电气与电子信息工程学院

专业名称:

电气工程及其自动化

学号:

学生姓名:

指导教师:

2014年11月28日

 

基于实时钟芯片的电子万年历的设计

 

摘要:

电子万年历以AT89S52单片机为控制核心,采用Dallas公司的DS12C887A实时钟芯片构成计时电路,实现了时间和日期的显示,还增加了温度显示和整点报时的功能。

文章对该系统的硬件电路、工作原理做了详细介绍,同时给出了软件设计的流程图及主要程序源代码。

关键词:

单片机,实时钟.温度测量

1.引言

电子万年历在家庭居室、学校、车站和广场使用越来越广泛,给人们的生活、学习、工作带来极大的方便。

针对以往的电子万年历断电后需重新调整时间与日期,且计时误差大的现象。

本系统设计采用实时钟芯片(DS12C887A)作为计时器件,该芯片内部自带晶体振荡器,这样就有效的保证了计时的精确性,并且内部自带铿电池使得在断电情况能继续更新时间信息。

本设计采用AT89S52作为主控制器,为了提高电路的实用性加入温度测量电路、报时和闹钟功能。

2.系统硬件的设计

电路原理图如图所示:

该系统的结构框图

系统的工作原理是:

主控制器每隔一段时间(小于一秒钟)读一次时钟芯片的内部寄存器的值,将读出的日历、时间信息实时的显示在LED数码显示器一上。

同时,主控制器不断的扫描按键电路和温度测量电路,当有键按下时,识别出按键的值并调整相应的时间或日历的值再写入时钟芯片内部。

温度数据由测量电路(DS1280)获得的温度值送入显示电路显示。

2.1电源电路

为了减少电路成本,本系统电源电路由变压器变压、三端集成稳压(L7805>电路产生5V,具有简单、可靠、价格低廉等特点。

2.2主控制器

主控制器采用ATMEL公司的最新系列单片机产品AT89S52。

该单片机除了拥有MCS-51系列单片机的所有优点外,内部还具有8KB的在系统可编程FLASH存储器,低功耗的空闲和掉电模式,极大的降低了电路的功耗。

另外,还具有一个看门狗电路,为电路的可靠工作提供了更大的保证。

2.3数码管显示电路

显示电路采用具有高亮度、使用寿命长、价格低廉等特点的LED数码管。

整个显示电路由LED数码管和显示驱动电路和译码电路构成。

由于本系统中显示的内容较多,共需要16个数码管,分别用八位显示年、月、日,四位显示时间,二二位显示星期,二位显示温度。

为了节省控制器的资源,在控制器和显示器之间加入一个译码电路使本来需要16根控制线的电路变成只需四根控制线,极大的节省了系统资源。

该译码器由两个3-8译码器构成。

2.4实时钟芯片

本设计采用美国Dallas公司的DS12C887A,该芯片能够自动产生世纪、年、月、日、时、分、秒等时间信息。

利用内部的世纪寄存器,配合软件就能解决’千年’,的问题。

该芯片内部自带有铿电池,外部掉电时,其内部的时间信息还能够保持10年之久。

对于一天内的时间记录有12小时制和24小时制两种模式。

时间的表示方法也有两种,一种用二进制数表示,另一种用BCD码表示。

该芯片内部带有128字节的RAM,其中11字节用来存储时间信息,4字节用来存储芯片的控制信息,称为控制寄存器,113字节通用RAM可供用户存储临时信息。

此外,用户还可以对芯片进行编程控制输出各种方波,并可对其内部的三路中断通过软件进行屏蔽。

2.5按键与温度测且电路

本系统为了使电路更简单,按键电路只设计了三个按键,分别是’设置’、’+’、’-’,三个键用来调整日历以及时钟。

本系统为了提高电路的实用性,增加了一个温度显示功能。

该系统的温度测量电路采用Dallas公司的DS1280。

该器件由于其具有价格低廉、电路简单、测量精确等优点。

2.6音频信号产生及驱动电路

本电路的功能是接收控制电路发送来的整点报时及定时信号,根据系统设定产生不同频率的音频信号,由驱动电路加以放大驱动扬声器发出声音,从而实现整点报时及闹钟的功能。

3.系统的软件设计

本系统程序由主程序、中断服务函数和多个子函数构成。

主函数主要完成各子函数和中断函数的初始化。

定时中断函数主要完成时钟芯片的定时扫描及键盘扫描。

时钟芯片的读写函数主要是将时间、日历信息读出来,并把要修改的具体值写入时钟芯片内部。

4.参考文献

[1]胡乾斌,李光斌,李玲,喻红.《单片微型计算机原理与应用》.华中科技大学出版社,1996. 

[2]刘勇.《数字电路》.电子工业出版社,2004. 

[3]陈正振.《电子电路设计与制作》.广西交通职业技术学院信息工程系,2007.

 [4]杨子文.《单片机原理及应用》.西安电子科技大学出版社,2006. 

[5]王萍.《电子技术实验教程》.机械工业出版社,2009. 

[6]沈红卫.《单片机应用系统设计实例与分析》,北京:

北京航空航天大学出版社.2003 

[7]李光飞.《单片机课程设计实例指导》,北京:

北京航空航天大学出版社. 2004

 [8]王法能.《单片机原理及应用》,科学出版社. 2004 

[9]楼然苗,李光飞.《51系列单片机设计实例》[M].北京航空航天大学出版社,2003.

 [10]朱定华,戴汝平.《单片微机原理与应用》[M].清华大学出版社,2003.

 [11]胡汉才.《单片机原理与接口技术》[M].清华大学出版社,2004. 

[12]余家春.《Protel 99 SE电路设计实用教程》[M].中国铁道出版社,2004. 

[13]张培仁.《基于汇编语言编程MCS-51单片机原理与应用》.北京:

清华大学出版社,2003.

 [14]T.Someya,J.Small,P.Kim,C.Nuckolls,J.T.Yardley.Alcohol vapor sensors     based on single-walled carbon nanotube field effect transistors[M].Nano Letters,2003. 

[15]M.Penza et al.Alcohol detection using carbon nanotubes acoustic and optical      sensors[M].Applied Physics Letters,2004. 

[16]F.Rettig,R.Moos.Direct thermoelectric gas sensors Design aspects and first gas  

    sensors[M].Sens Actuators B,2007.

 

DesignofthedigitalPerpetualCalendarbasedon

real-timeclockchip

 

Abstract:

ThisElectroniccalendarusestheAT89S52microcontrollerasthecoreforthecontrol.TimeCircuitwhichisconstitutedbyDallas'sDS12C887Areal-timeclockchipachievedatimeanddatedisplay,itincreasedfunctionalityforthetemperaturedisplayandthewholepointtimekeeping.Thispaperdiscussesthehardwarecircuitofthesystem,principleindetail,andgivestheflowchartofthesoftwaredesignandthemajorsourcecode.Keywords:

microcontroller;real-timeclock;Temperaturemeasurement

1.Introduction

E-calendar-bedroomathome,schools,stationsandmoreandmoreextensiveuseofplazaforpeople'slives,study,workgreatconvenience.Electronicscalendarforthepastneedtore-adjustafterpower-offtimeanddate,andtimeisabigerror.Designedthesystemusingreal-timeclockchip(DS12C887A)asatimerparts,thechipcomeswithaninternalcrystaloscillator,sothateffectivelyguaranteetheaccuracyofthetimeandhangowninternalbatterypowermakesthesituationwillcontinuetoupdatethetimeinformation.ThisdesignusesAT89S52asthemaincontroller,inordertoimprovethepracticalityofthecircuitaddtemperaturemeasurementcircuit,timekeepingandalarmfunctions.

2.Systemhardwaredesign

SchematiccircuitshowninFigure2:

Systemarchitecturediagram

2.1PowerSupplyCircuit

Inordertoreducecircuitcosts,thesystempowersupplycircuitbythetransformer,three-terminalintegratedregulator(L7805>circuit5V,hasasimple,reliable,inexpensiveandsoon.

2.2HostController

HostcontrollerusingATMEL'slatestMCUProductsAT89S52.Apartfromthesingle-chipmicrocomputerhasaMCS-51seriessingle-chipallthebenefitsofthings,alsohas8KBofinternalin-systemprogrammableFLASHmemory,freeandlow-powerbrown-outmode,greatlyreducingthepowercircuit.Inaddition,alsohasawatchdogcircuit,areliablejobforthecircuitprovidesgreaterassurance.

2.3digitaltubedisplaycircuit

Showcircuitwithahighbrightness,longlife,lowcostfeaturessuchastheLEDdigitaltube.ThroughouttheshowcircuitbythedigitalcontrolanddisplayLEDdrivecircuitanddecodingcircuit.Becauseofthesystemtodisplaythecontentsofmore,atotalof16digitaltube,respectively,witheightshowsyear,month,day,fourshowtime,showthat22weeks,2showthetemperature.Controllerinordertosaveresources,betweenthecontrolleranddisplaysaddadecodingcircuit16sothatwouldhaverequiredthelineofcontrolintothecircuitonly4controllines,agreatsavesystemresources.Thedecoderbythedecoderconstituteboth3-8.

2.4Real-timeclockchip

ThisdesignusestheUnitedStatesDallascompanyDS12C887A,thechipcanautomaticallygeneratecentury,year,month,day,hour,minute,second,suchastimeinformation.Centurytheuseofinternalregisterswiththesoftwarewillbeabletoresolvethe'Millennium',theproblem.Thechiphasitsowninternalbattery-keng,externalbrown-out,theinternaltimeinformationalsobeabletomaintainfor10years.Timeforasingledayrecordof12hoursandthereisa24-hourmode.TimeTable

Waysthatalsohastwokindsofbinarynumbers,andtheotherwithBCDcodeexpress.Thechipwith128bytesofinternalRAM,oneof11bytesusedtostoretimeinformation,4bytesofmemorychipsusedtocontrolinformation,knownasthecontrolregister,113-bytegeneral-purposeRAMforuserstostoretemporaryinformation.Inaddition,userscanalsoprogramthechiptocontrolavarietyofsquare-waveoutput,anditsinternalthree-waythroughthesoftwareinterruptshielding.

2.5Buttonsandtemperaturemeasurementsandcircuit

Thesysteminordertomakethecircuitmoreeasy,buttoncircuitdesignonlythreekeys,whichare'set','+','-',threekeystoadjustthecalendarandclock.Thesysteminordertoimprovethepracticalityofthecircuit,anincreaseofatemperaturedisplay.ThesystemtemperaturemeasurementcircuitusingDallas'sDS1280.Thedevicebecauseofitslowprice,easycircuits,measurementprecision,etc..

2.6audiosignalgeneratoranddrivercircuit

Thecircuit'sfunctionistoreceivecontrolcircuittosendtotheentirepointoftimeandtimingsignal,accordingtosystemsettingsproducedifferentfrequenciesofaudiosignals,amplificationbythedrivecircuittodrivespeakerstovoicetheiropinionsinordertorealizethewholepointtimekeepingandalarmfunctions.

3.systemsoftwaredesign

ProceduresofthesystembythemainprograminterruptservicefunctionandposeanumberofFunctions.Mainfunctionandinterruptthecompletionoftheinitializationfunction.Timerinterruptfunctionmaintimingclockchiptocompletescanningandkeypadscanning.Clockchipmainfunctionistoreadandwritetime,readoutthecalendarinformationandtoamendthespecificvalueoftheinternalwriteclockchip.

Themainsourcecodeisasfollows:

4.Reference

[1]HuQianbin, LiGuangbin, LiLing, YuHong. "Theprincipleandapplicationof singlechipmicro computer". HuazhongUniversityofScienceandTechnologypress, 1996

[2] LiuYong. "Digital circuit". PublishingHouseofelectronicsindustry, 2004

[3] ChenZhengzhen. "Designandmaking" electronic circuit. TheGuangxiVocationalandTechnicalCollegeofCommunications Departmentofinformationengineering,2007

[4] YangZiwen. "Singlechipmicrocomputerprincipleandapplication". Xi'anElectronicandScienceUniversitypress, 2006

[5] WangPing. "Electronictechnology experimenttutorial".Mechanical IndustryPress, 2009

[6] ShenHongwei. "Singlechipmicrocomputerapplicationsystemdesign examplesand analysis", Beijing:

BeihangUniversity press,.2003

[7] LiGuangfei. "SCMcurriculum designguide", Beijing:

 BeihangUniversitypress.2004

[8] WangFaneng. "Singlechipmicrocomputerprincipleandapplication", SciencePress.2004

[9]LouRanmiao, LiGuangfei. "The51 seriessinglechip designexample" [M].BeihangUniversitypress, 2003

[10]ZhuDinghua, DaiRuping. "" theprincipleandapplicationof singlechipmicrocomputer[M]. TsinghuaUniversitypress, 2003

[11] HuHancai. "Singlechipmicrocomputerprincipleandinterfacetechnology" [M].TsinghuaUniversitypress, 2004

[12] YuJiachun. "PracticalProtel 99SE circuit designtutorial" [M]. ChinaRailwayPublishingHouse, 2004

[13] ZhangPeiren. "Theprincipleandapplicationof" assemblylanguageprogramming basedonsinglechipmicrocomputerMCS-51.Beijing:

 TsinghuaUniversitypress, 2003

 [14]T.Someya,J.Small,P.Kim,C.Nuckolls,J.T.Yardley.Alcohol vapor sensors     based on single-walled carbon nanotube field effect transistors[M].Nano Letters,2003. 

[15]M.Penza et al.Alcohol detection using carbon nanotubes acoustic and optical      sensors[M].Applied Physics Letters,2004. 

[16]F.Rettig,R.Moos.Direct thermoelectric gas sensors Design aspects and first gas  

    sensors[M].Sens Actuators B,2007.

 

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

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1