资源描述:
《基于52单片机的闹钟c语言分析》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、基于52单片机的闹钟C语言分析ThesystemiscomposedmainlyofAT89C51singlechipmachineanddigitaltubeandkeypad,andrealizesthefunctionofclockdisplayandfixedalarm.Userscanchangetheclockbypressingthebuttontocheckthealarmclock・BecausethesystemUSESadigitaltubeasadisplay,itismoreconvenientt
2、oviewtimeatnight・Inaddition,thesystemcansetupamaximumof10timeperiods,whichisafunctionoftheaveragealarmclock.Keywords:singlechip,alarmclock,digitaltubeThechoiceandargumentoftheplanAccordingtotherequirementsofthesubject,themainpartsofthesystemincludethefollowingpart
3、s:1,thebuttonSeenario1:4*4matrixkeyboards・Ifthisoptionischosen,itiseasyandeasytoenterfromthekeyboardwhenmodifyingtheclockorsettingthealarmclock,buttheprogramismorecomplex.Solution2:freestandingbuttons・Iftoomanybuttonsareset,moreI/Owillbeused,andthewiringwillbeinco
4、nvenienced,sothesolutionappliestofewerbuttons・Lessifyouchoosethisplan,becausethebuttons,inmodificationtimeorsetthealarmtimecannotenterdirectly,canonlybedonebyplusorminus,alittletroublesome,buttheprogramissimple・Sincethereisnoneedtomodifythetimeandsetthealarmtime,a
5、ndtheprogramissimple,thebuttonsarelowandthecostislow,sochooseplantwo.2,displaySolution1:LCDdisplay.Ifthisoptionischosen,itwillreducethepowerconsumptionofthesystemsothatitcanbepoweredbybatteriesandportable・ButthepowercircuitoftheLCDSiscomplexanddifficulttouse・Scena
6、rio2:useadigitaltubeasadisplay.Thepowercircuitofthedigitaltubeissimple,easytouse,andifyouchoosethisoption,youdon,tneedtohavealightsourceatnight,whichisveryconvenient・Thedisadvantagesarethepowerconsumption.Sincetheuseofthedigitaltubeisconvenient,itisalsoconvenientt
7、owatchatnight,sowechoseplantwo.timingsIftheclockchipisused,thesystemisnotafraidtodroptheelectricityandthetimeisaccurate・Butthiskindofchipismoreexpensive,besides,thissystemismainlydesignedtolearnmicrocontrollerprogramwritinganddebuggingandsomemethodstodesignhardwar
8、ecircuit,soadoptthemethodofsoftwaretotimingandnoclockchipwithhighprices・ThepronunciationpartUsingasoftwaremethodtogeneratethesquarewaveoutput,whichisamp