STM32的火车站电子时钟设计
STMIIIII的火车站电子时钟设计
(刘军,北京航空航天大学出版社,II0I.III)
I..STMIIIII简介
STMIIIII系列专为要求高性能.低成本.低功耗的嵌入式应用专门设计的ARMCortex-MIII内核.按性能分成两个不同的系列:STMIIIIIFI.0III增强型"系列和STMIIIIIFI.0I.基本型"系列.增强型系列时钟频率达到VIIIIMHz,是同类产品中性能最高的产品;基本型时钟频率为IIIVIMHz,以I.VI位产品的价格得到比I.VI位产品大幅提升的性能,是I.VI位产品用户的最佳选择.两个系列都内置IIIIIK到I.IIVIIIK的闪存,不同的是SRAM的最大容量和外设接口的组合.时钟频率VIIIIMHz时,从闪存执行代码,STMIIIII功耗IIIVImA,是IIIII位市场上功耗最低的产品,相当于0.VmA/MHz.
(I.)意法半导体(STMicroelectronics)
意法半导体(STMicroelectronics)集团于I.IXVIIIVII年VI月成立,是由意大利的SGS微电子公司和法国Thomson半导体公司合并而成.I.IXIXVIII年V月,SGS-THOMSONMicroelectronics将公司名称改为意法半导体有限公司.意法半导体是世界最大的半导体公司之I..从成立之初至今,ST的增长速度超过了半导体工业的整体增长速度.自I.IXIXIX年起,ST始终是世界X大半导体公司之I..据最新的工业统计数据,意法半导体(STMicroelectronics)是全球第V大半导体厂商,在很多市场居世界领先水平.例如,意法半导体是世界第I.大专用模拟芯片和电源转换芯片制造商,世 *好棒文|www.hbsrm.com +Q: *351916072*
界第I.大工业半导体和机顶盒芯片供应商,而且在分立器件.手机相机模块和车用集成电路领域居世界前列.
意法半导体(STMicroelectronics)整个集团共有员工近V0,000名,拥有I.VI个先进的研发机构.IIIIX个设计和应用中心.I.V主要制造厂,并在IIIVI个国家设有VIIVIII个销售办事处.公司总部设在瑞士日内瓦,同时也是欧洲区以及新兴市场的总部;公司的美国总部设在德克萨斯州达拉斯市的卡罗顿;亚太区总部设在新加坡;日本的业务则以东京为总部;大中国区总部设在上海,负责香港.大陆和台湾III个地区的业务.
自I.IXIXIV年I.II月VIII日首次完成公开发行股票以来,意法半导体已经在纽约证券交易所(交易代码:STM)和泛欧巴黎证券交易所挂牌上市,I.IXIXVIII年VI月,又在意大利米兰证券交易所上市.意法半导体拥有近IX亿股公开发行股票,其中约VIII..I.%的股票是在各证券交易所公开交易的.另外有IIVII.V%的股票由意法半导体控股IIB.V.有限公司持有,其股东为Finmeccanica和CDP组成的意大利Finmeccanica财团和Areva及法国电信组成的法国财团;剩余I..IV%的库藏股由意法半导体公司持有.
(II)ST超低功耗ARM?Cortex?-MIII微控制器
STMIIIIIL系列产品超低功耗的ARMCortex-MIII处理器内核,采用意法半导体独有的两大节能技术:I.III0nm专用低泄漏电流制造工艺和优化的节能架构,提供业界领先的节能性能.该系列属于意法半导体阵容强大的IIIII位STMIIIII微控制器产品家族,目前该产品家族共有I.VIII0余款产品,全系列产品共用大部分引脚.软件和外设,优异的兼容性为开发人员带来最大的设计灵活性.
(III)ST超低功耗ARM?Cortex?-M0微控制器
STMIIIIIF0系列产品超低功耗的ARMCortex-M0处理器内核,整合增强的技术和功能,瞄准超低成本预算的应用.该系列微控制器缩短了采用VIII位和I.VI位微控制器的设备与采用IIIII位微控制器的设备之间的性能差距,能够在经济型用户终端产品上实现先进且复杂的功能.
(IV)产品介绍
在STMIIIIIFI.0V和STMIIIIIFI.0VII互连型系列微控制器之前,意法半导体已经推出STMIIIII基本型系列.增强型系列.USB基本型系列和增强型系列;新系列产品沿用增强型系列的VIIIIMHz处理频率.内存包括VIIVKB到IIVVIKB闪存和II0KB到VIIVKB嵌入式SRAM.新系列采用LQFPVIIV.LQFPI.00和LFBGAI.00III种封装,不同的封装保持引脚排列I.致性,结合STMIIIII平台的设计理念,开发人员通过选择产品可重新优化功能.存储器.性能和引脚数量,以最小的硬件变化来满足个性化的应用需求.
(V)STMIIIIIFI.0III性能特点
(I.)内核:ARMIIIII位Cortex-MIIICPU,最高工作频率VIIIIMHz,I..IIVDMIPS/MHz.单周期乘法和硬件除法.
(II)存储器:片上集成IIIII-VI.IIKB的Flash存储器.VI-VIIVKB的SRAM存储器.
(III)时钟.复位和电源管理:II.0-III.VIV的电源供电和I/O接口的驱 *好棒文|www.hbsrm.com +Q: *351916072*
动电压.POR.PDR和可编程的电压探测器(PVD).IV-I.VIMHz的晶振.内嵌出厂前调校的VIIIMHzRC振荡电路.内部IV0kHz的RC振荡电路.用于CPU时钟的PLL.带校准用于RTC的IIIIIkHz的晶振.
(IV)低功耗:III种低功耗模式:休眠,停止,待机模式.为RTC和备份寄存器供电的VBAT.
(V)调试模式:串行调试(SWD)和JTAG接口.
(VI)DMA:I.II通道DMA控制器.支持的外设:定时器,ADC,DAC,SPI,IIC和USART.
(VII)II个I.II位的us级的A/D转换器(I.VI通道):A/D测量范围:0-III.VIV.双采样和保持能力.片上集成I.个温度传感器.
(VIII)II通道I.II位D/A转换器:STMIIIIIFI.0IIIxC,STMIIIIIFI.0IIIxD,STMIIIIIFI.0IIIxE独有.
(IX)最多高达I.I.II个的快速I/O端口:根据型号的不同,有IIVI,IIIVII,VI.,VIII0,和I.I.II的I/O端口,所有的端口都可以映射到I.VI个外部中断向量.除了模拟输入,所有的都可以接受VV以内的输入.
(I.0)最多多达I.I.个定时器:IV个I.VI位定时器,每个定时器有IV个IC/OC/PWM或者脉冲计数器.II个I.VI位的VI通道高级控制定时器:最多VI个通道可用于PWM输出.II个看门狗定时器(独立看门狗和窗口看门狗).Systick定时器:IIIV位倒计数器.II个I.VI位基本定时器用于驱动DAC.
(I.I.)最多多达I.III个通信接口:II个IIC接口(SMBus/PMBus).V个USART接口(ISOVIIVIIII.VI接口,LIN,IrDA兼容,调试控制).III个SPI接口(I.VIIIMbit/s),两个和IIS复用.CAN接口(II.0B).USBII.0全速接口.SDIO接口.
(I.II)ECOPACK封装:STMIIIIIFI.0IIIxx系列微控制器采用ECOPACK封装形式.
(VI)架构优势
除新增的功能强化型外设接口外,STMIIIII互连系列还提供与其它STMIIIII微控制器相同的标准接口,这种外设共用性提升了整个产品家族的应用灵活性,使开发人员可以在多个设计中重复使用同I.个软件.新STMIIIII的标准外设包括I.0个定时器.两个I.II位I.-Msample/s模数转换器(交错模式下II-Msample/s).两个I.II位数模转换器.两个IIIC接口.V个USART接口和III个SPI端口.新产品外设共有I.II条DMA通道,还有I.个CRC计算单元,像其它STMIIIII微控制器I.样,支持IXVI位唯I.标识码.
新系列微控制器还沿续了STMIIIII产品家族的低电压和节能两大优点.II.0V到III.VIV的工作电压范围兼容主流的电池技术,如锂电池和镍氢电池,封装还设有I.个电池工作模式专用引脚Vbat.以VIIIIMHz频率从闪存执行代码,仅消耗IIVIImA电流.低功耗模式共有IV种,可将电流消耗降至两微安.从低功耗模式快速启动也同样节省电能;启动电路使用STMIIIII内部生成的VIIIMHz信号,将微控制器从停止模式唤醒用时小于VI微秒.
II.火车站电子时钟简介
火车站电子时钟为乘客乘车提供方便,在提醒广大乘客火车发车时间上发挥举足轻重的作用.在目前的国内外市场中,Clockproductrange,但他们大多存在I.个致命缺点即价格低廉的精度低.体积大,而精度高体积小的却价格昂贵,在智能化方面也存在I.定问题.本单片机的电子时钟系统的设计旨在解决上述缺点折合为I.个适中的产品实现高精度.小体积.低价格.易操作等优点,为火车站火车发车时间,提醒乘客上车时间提供方便.
(I.)背景介绍
从古代的沙漏计时,到现在的机械钟表.石英钟,计时技术得发展经过了I.个漫长的完善过程,这充分显现出了时间不论对古人还是现在的我们的重要性.现在,全球社会都进入了信息化时代,人们更加重了对时间计量精度的依赖,以至于钟表应用越来越广,功能越来越多.普通的机械表对于当代人复杂繁琐的要求显然早已不太适应,电子时钟应运而生.电子时钟不仅能满足基本时间要求,而且体积小,成本低廉,最大的亮点在于可以随时根据不同的客户要求进行改进.增加功能,所以电子钟越来越受到人们的青睐.
(II)功能实现
由于单片机有价格实惠而且功能齐全的优点,在自动控制产品中广泛应用.本设计STMIIIII设计火车站电子时钟,通过LCD液晶屏完成其显示.计时.提示乘客上车功能,本设计实现了所需功能的硬件电路,并应用C语言进行软件编程.
附件II:外文原文
STMIIIII-baseddesignofthetrainstationelectronicclock
(liujun,BeihangUniveristypress,II0I.III)
A.IntroductionofSTMIIIII
STMIIIIIisbasedonthefamilyofARMCortex-MIIIcore-designedspecificallyforembeddedapplicationsthatrequirehighperformance,lowcost,lowpowerconsumption.Theperformanceisdividedintotwodifferentseries:STMIIIIIFI.0IIIthe"Enhanced"seriesandSTMIIIIIFI.0I.the"Basic"series.TheclockfrequencyofEnhancedSeriesisuptoVIIIIMHz,thehighestperformanceofsimilarproducts;theclockfrequencyofBasicSeriesisIIIVIMHz,andthepricesofI.VIpositionproductssignificantlyenhancetheperformanceofmorethanI.VIpositionproducts,isthebestchoiceuserstobuythem.Thetwoseriesarebuilt-inflashfromIIIIIKtoI.IIVIIIK,isthecombinationofthemaximumcapacityoftheSRAMandperipheralinterfaces.WhentheclockfrequencyreachesVIIIIMHz,itexecutesfromFlashandtheSTMIIIIIpowerconsumptionisIIIVImA,thelowestpowerconsumptionintheIIIII-bitmarketproducts,theequivalentanimpressive0.VmA/MHz.
a.STMicroelectronicsGroup
STMicroelectronicsGroupwasestablishedinJuneI.IXVIIIVII,isamergerofItalysSGSMicroelectronicsandtheFrenchThomsonsemiconductorcompany.InMayI.IXIXVIII,SGS-THOMSONMicroelectronicswillchangethecompanynametoSTMicroelectronicsLimited.STMicroelectronicsisoneofthelargestsemiconductorcompaniesintheworld.Fromitsinceptiontodate,STsgrowingfasterthantheoverallrateofgrowthofthesemiconductorindustry.SinceI.IXIXIX,SThasalwaysbeenoneoftheworldstoptensemiconductorcompanies.Accordingtothelatestindustrystatistics,STMicroelectronicsistheworldsfifthlargestsemiconductormanufacturerandaworldleaderinmanymarkets.Forexample,STMicroelectronicsistheworldslargestdedicatedanalogchipsandpowerconversionchipmanufacturers,theworldslargestindustrialsemiconductorandset-topboxchipsuppliersanddiscretedevices,mobilephonecameramoduleandcarfieldofintegratedcircuitshighestintheworld.
STMicroelectronicshastheentiregroupemploysnearlyV0,000,withI.VIstate-of-the-artR&DinstitutionsandIIIIXdesignandapplicationcenters,I.Vmainmanufacturingplant,andhasVIIVIIIsalesofficesinIIIVIcountries.ThecompanyisheadquarteredinGeneva,Switzerland,isalsotheheadquartersofEuropeanandemergingmarkets;companysU.S.headquartersinDallas,Texas,Carrollton;Asia-PacificheadquartersinSingapore;businessinJapanbyTokyoasaheadquarters;GreaterChinaheadquartersinShanghai,responsibleforbusinessinHongKong,mainlandChinaandTaiwan.
DecemberVIII,I.IXIXIVforthefirsttimesincethecompletionofthepublicofferingofshares,STMicroelectronicshasbeeninNewYorkStockExchange(tickersymbol:STM)andPanOuBaliStockExchangelisted,inJuneI.IXIXVIII,inMilan,Italy,securitiesExchange.STMicroelectronicshasnearlyIX00millionsharesinthepublicofferingofshares,ofwhichapproximatelyVIII..I.%ofthesharesarepubliclytradedonthevariousstockexchanges.AnotherIIVII.V%ofthestockbySTMicroelectronicsHoldingIIBVLimitedhelditsshareholdersFinmeccanicaandCDPItalianFinmeccanicaconsortiumArevaandFranceTelecom,theFrenchconsortium;remainingI..IV%oftreasurysharesbySTMicroelectronicshold.
b.STultra-low-powerARM?Cortex?-MIIImicrocontroller
STMIIIIILseriesofproductsarebasedontheultra-low-powerARMCortex-MIIIprocessorcore,STMicroelectronicstwouniqueenergy-savingtechnologies:I.III0nmdedicatedlow-leakagecurrentmanufacturingprocessandoptimizeenergy-savingarchitecturetodeliverindustry-leadingenergy-savingperformance.ThisseriesbelongstothelineupIIIIISTMicroelectronicsSTMIIIIImicrocontrollerproductfamily,theproductfamily,atotalofI.VIII0balanceofproduct,thefullrangeofproductssharemostofthepin,softwareandperipherals,excellentcompatibilitywithdeveloperstothemaximumdesignflexibility.
c.STultra-low-powerARM?Cortex?-M0microcontroller
STMIIIIIF0seriesofproductsarebasedontheultra-low-powerARMCortex-M0processorcoretechnologyandfeatures,enhancedintegration,aimedattheapplicationofultra-low-costbudget.ThefamilyofmicrocontrollerstoshortentheVIII-bitandI.VI-bitmicro-controllerdevicesandtheperformancegapbetweentheIIIII-bitmicrocontrollerdevice,theuserterminalproductsintheeconomytoachievestate-of-the-artcomplexfeatures.
d.Products
BeforeSTMIIIIIFI.0VandSTMIIIIIFI.0VIIinterconnectfamilyofmicrocontrollers,STMicroelectronicshasintroducedtheSTMIIIIIAccessLineEnhancedSeries,theseriesoftheUSBbasicseriesandenhanced;newproductsfollowtheEnhancedSeriesVIIIIMHzprocessingfrequency.MemoryVIIVKBtoIIVVIKBFlashandII0KBtoVIIVKBembeddedSRAM.TheLQFPVIIV,LQFPI.00,andLFBGAI.00threepackageinthenewseries,adifferentpackagetomaintainthepinoutconsistency,combinedwiththeSTMIIIIIplatformdesignphilosophy,anddevelopersbyselectingtheproductscanbere-optimizationfunction,memory,performanceandpincount,withaminimumofhardwarechangestomeetindividualapplicationneeds.
e.STMIIIIIFI.0IIIperformancecharacteristics
(I.)Thekernel:ARMIIIII-bitCortex-MIIICPU,themaximumoperatingfrequencyofVIIIIMHz,I..IIVDMIPS/MHz.Single-cyclemultiplyandhardwaredivision.
(II)Memory:integratedon-chipIIIII-VI.IIKBofFlashmemoryandVI-VIIVKBSRAMmemory.
(III)Clockresetandpowermanagement:II.0-III.VIVdrivevoltageofthepowersupplyandI/Ointerface,POR,PDRandprogrammablevoltagedetector(PVD),IV-I.VIMHzcrystaloscillator,embeddedVIIIMHzRCoscillatortuningcircuitinthefactory,IV0kHzinternalRCoscillatorcircuit.FortheCPUclockPLL.WiththecalibrationfortheRTCIIIIIkHzcrystal.
(IV)Lowpowerconsumption:threekindsoflow-powermodes:Sleep,stop,standbymode.PoweredtheVBATRTCandbackupregisters.
(V)Debugmode:serialdebug(SWD)andJTAGinterfaces.
(VI)DMA:I.II-channelDMAcontroller;supportedperipherals:timers,ADC,DAC,SPI,IICandUSART.
(VII)III.IIusclassA/Dconverter(I.VI-channel):A/Dmeasurementrange:0-III.VIV.Dualsampleandholdcapability.Thechipintegratesatemperaturesensor.
(VIII)II-channelI.II-bitD/Aconverter:STMIIIIIFI.0IIIxCSTMIIIIIFI.0IIIxDSTMIIIIIFI.0IIIxEunique.
(IX)AmaximumofuptoI.I.IIfastI/Oports:Dependingonthemodel,IIVI,IIIVII,VI.,VIII0,andI.I.III/Oports,allportscanbemappedtotheI.VIexternalinterruptvectors.InadditiontotheanaloginputcanacceptlessthanVVinput.
(I.0)AmaximumofuptoI.I.timers:fourI.VI-bittimers,eachtimerIVIC/OC/PWMorpulsecounter.TwoI.VI-channeladvancedcontroltimer:uptoVIchannelsforPWMoutput.IIwatchdogtimers(independentwatchdogandwindowwatchdog).Systicktimer:IIIV-bitdowncounter.TwoI.VI-bitbasictimersareusedtodrivetheDAC.
(I.I.)AmaximumofuptoI.IIIcommunicationinterfaces:twoIICinterface(SMBus/PMBus),VUSARTinterface(ISOVIIVIIII.VIinterface,LIN,IrDAcompatible,thedebuggingcontrol),ThreeSPIinterface(I.VIIIMbit/s),twoandIISreuse,CANinterface(II.0B),USBII.0full-speedinterface,SDIOinterface.
(I.II)ECOPACKpackage:STMIIIIIFI.0IIIxxfamilyofmicrocontrollersECOPACKpackage.
f.Architecturaladvantages
Inadditiontothenewfeaturesenhancedperipheralinterface,STMIIIIIinterconnectionseriesalsoprovidethesamestandardinterfacewithotherSTMIIIIImicrocontrollersharedthisperipheralenhanceapplicationflexibilityoftheentireproductfamily,sothatdeveloperscanmultipledesignstorepeateduseofthesamesoftware.NewSTMIIIIIstandardperipheralsincludeI.0timers,twoI.II-Msample/sanalog-to-digitalconverter(InterleavedII-Msample/smode),twoI.II-bitdigital-to-analogconverters,twoIIICinterfacefivetheUSARTinterfaceandthreeSPIports.AtotalofI.IInewproductsperipheralDMAchannels,thereisaCRCcalculationunit,likeotherSTMIIIIImicrocontrollersupportsIXVIuniqueidentificationnumber.
ThenewfamilyofmicrocontrollersalsohasfollowedtheSTMIIIIIproductfamilyoflow-voltageandenergy-savingadvantages.TheoperatingvoltagerangeofII.0VtoIII.VIV,compatiblewithmainstreambatterytechnology,suchaslithiumbatteriesandnickel-metalhydridebatteries,thepackagealsofeaturesabatterymodededicatedpinVbat.VIIIIMHzfrequencycodeexecutionfromflashconsumesonlyIIVIImAofcurrent.Low-powermode,therearefour;thecurrentconsumptioncanbereducedtotwomicroamps.Faststartfromthelow-powermodetosaveenergy;startcircuitSTMIIIIIinternallygeneratedVIIIMHzsignaltowakeupthemicrocontrollerfromstopmodewithlessthanVImicroseconds.
B.Introduceelectronicclocktrainstation
Trainelectronicclocktofacilitatepassengerstraveling,Playapivotalroletoremindthemajorityofpassengersonthetraindeparturetime.Inthecurrentdomesticandinternationalmarkets,Clockproductrange,Butmostofthemthereisafatalflawthatlowlowpriceaccuracy,bulky,Thehighprecisionsmallbutexpensive,Therearesomeproblemsintermsofintelligence.Thedesignofmicrocontrollerbasedelectronicclocksystemisdesignedtoaddresstheseshortcomingsequivalenttoamoderate-precisionproductstoachievetheadvantagesofsmallsize,lowpriceandeasyoperation,thetraindeparturetimeforthetrainstationtoremindpassengersonthetrainoftimewithease.
a.Backgroundintroduction
Fromancienthourglasstimer,andnowmechanicalwatches,quartz,Timingtechnologywasdevelopedthroughalongprocessofimprovement,whichfullyshowwhetherthetimeisnowforourancientimportance.Now,theglobalcommunityhasenteredtheinformationage,peoplearemoreheavyrelianceontheaccuracyoftimemeasurement,sowatchmorewidely,moreandmorepowerful.Ordinarymechanicalwatchforcontemporarycomplexandcumbersomerequirementsapparentlyhadnotadapt,electronicclockcameintobeing.Electronictimeclockcannotonlymeetthebasicrequirements,andsmallsize,lowcost,thebiggestbrightspotisthatitcanalwaysbeimprovedbyaddingfeaturesaccordingtodifferentcustomerrequirements,sotheelectronicclockmoreandmorepeopleofallages.
b.Functionstoachieve
Duetothemicrocontrolleratanaffordablepriceandfunctionaladvantages,theproductiswidelyusedinautomaticcontrol.ThedesignisbasedSTMIIIIIDesignStationelectronicclock,throughthecompletionofitsLCDscreendisplay,timing,tipsonpassengercarfeatures,designedtoachievethedesiredfunctionalityofthehardwarecircuitryandsoftwareapplicationsinClanguageprogramming.
(刘军,北京航空航天大学出版社,II0I.III)
I..STMIIIII简介
STMIIIII系列专为要求高性能.低成本.低功耗的嵌入式应用专门设计的ARMCortex-MIII
(I.)意法半导体(STMicroelectronics)
意法半导体(STMicroelectronics)集团于I.IXVIIIVII年VI月成立,是由意大利的SGS微电子公司和法国Thomson半导体公司合并而成.I.IXIXVIII年V月,SGS-THOMSONMicroelectronics将公司名称改为意法半导体有限公司.意法半导体是世界最大的半导体公司之I..从成立之初至今,ST的增长速度超过了半导体工业的整体增长速度.自I.IXIXIX年起,ST始终是世界X大半导体公司之I..据最新的工业统计数据,意法半导体(STMicroelectronics)是全球第V大半导体厂商,在很多市场居世界领先水平.例如,意法半导体是世界第I.大专用模拟芯片和电源转换芯片制造商,世 *好棒文|www.hbsrm.com +Q: *351916072*
界第I.大工业半导体和机顶盒芯片供应商,而且在分立器件.手机相机模块和车用集成电路领域居世界前列.
意法半导体(STMicroelectronics)整个集团共有员工近V0,000名,拥有I.VI个先进的研发机构.IIIIX个设计和应用中心.I.V主要制造厂,并在IIIVI个国家设有VIIVIII个销售办事处.公司总部设在瑞士日内瓦,同时也是欧洲区以及新兴市场的总部;公司的美国总部设在德克萨斯州达拉斯市的卡罗顿;亚太区总部设在新加坡;日本的业务则以东京为总部;大中国区总部设在上海,负责香港.大陆和台湾III个地区的业务.
自I.IXIXIV年I.II月VIII日首次完成公开发行股票以来,意法半导体已经在纽约证券交易所(交易代码:STM)和泛欧巴黎证券交易所挂牌上市,I.IXIXVIII年VI月,又在意大利米兰证券交易所上市.意法半导体拥有近IX亿股公开发行股票,其中约VIII..I.%的股票是在各证券交易所公开交易的.另外有IIVII.V%的股票由意法半导体控股IIB.V.有限公司持有,其股东为Finmeccanica和CDP组成的意大利Finmeccanica财团和Areva及法国电信组成的法国财团;剩余I..IV%的库藏股由意法半导体公司持有.
(II)ST超低功耗ARM?Cortex?-MIII微控制器
STMIIIIIL系列产品超低功耗的ARMCortex-MIII处理器内核,采用意法半导体独有的两大节能技术:I.III0nm专用低泄漏电流制造工艺和优化的节能架构,提供业界领先的节能性能.该系列属于意法半导体阵容强大的IIIII位STMIIIII微控制器产品家族,目前该产品家族共有I.VIII0余款产品,全系列产品共用大部分引脚.软件和外设,优异的兼容性为开发人员带来最大的设计灵活性.
(III)ST超低功耗ARM?Cortex?-M0微控制器
STMIIIIIF0系列产品超低功耗的ARMCortex-M0处理器内核,整合增强的技术和功能,瞄准超低成本预算的应用.该系列微控制器缩短了采用VIII位和I.VI位微控制器的设备与采用IIIII位微控制器的设备之间的性能差距,能够在经济型用户终端产品上实现先进且复杂的功能.
(IV)产品介绍
在STMIIIIIFI.0V和STMIIIIIFI.0VII互连型系列微控制器之前,意法半导体已经推出STMIIIII基本型系列.增强型系列.USB基本型系列和增强型系列;新系列产品沿用增强型系列的VIIIIMHz处理频率.内存包括VIIVKB到IIVVIKB闪存和II0KB到VIIVKB嵌入式SRAM.新系列采用LQFPVIIV.LQFPI.00和LFBGAI.00III种封装,不同的封装保持引脚排列I.致性,结合STMIIIII平台的设计理念,开发人员通过选择产品可重新优化功能.存储器.性能和引脚数量,以最小的硬件变化来满足个性化的应用需求.
(V)STMIIIIIFI.0III性能特点
(I.)内核:ARMIIIII位Cortex-MIIICPU,最高工作频率VIIIIMHz,I..IIVDMIPS/MHz.单周期乘法和硬件除法.
(II)存储器:片上集成IIIII-VI.IIKB的Flash存储器.VI-VIIVKB的SRAM存储器.
(III)时钟.复位和电源管理:II.0-III.VIV的电源供电和I/O接口的驱 *好棒文|www.hbsrm.com +Q: *351916072*
动电压.POR.PDR和可编程的电压探测器(PVD).IV-I.VIMHz的晶振.内嵌出厂前调校的VIIIMHzRC振荡电路.内部IV0kHz的RC振荡电路.用于CPU时钟的PLL.带校准用于RTC的IIIIIkHz的晶振.
(IV)低功耗:III种低功耗模式:休眠,停止,待机模式.为RTC和备份寄存器供电的VBAT.
(V)调试模式:串行调试(SWD)和JTAG接口.
(VI)DMA:I.II通道DMA控制器.支持的外设:定时器,ADC,DAC,SPI,IIC和USART.
(VII)II个I.II位的us级的A/D转换器(I.VI通道):A/D测量范围:0-III.VIV.双采样和保持能力.片上集成I.个温度传感器.
(VIII)II通道I.II位D/A转换器:STMIIIIIFI.0IIIxC,STMIIIIIFI.0IIIxD,STMIIIIIFI.0IIIxE独有.
(IX)最多高达I.I.II个的快速I/O端口:根据型号的不同,有IIVI,IIIVII,VI.,VIII0,和I.I.II的I/O端口,所有的端口都可以映射到I.VI个外部中断向量.除了模拟输入,所有的都可以接受VV以内的输入.
(I.0)最多多达I.I.个定时器:IV个I.VI位定时器,每个定时器有IV个IC/OC/PWM或者脉冲计数器.II个I.VI位的VI通道高级控制定时器:最多VI个通道可用于PWM输出.II个看门狗定时器(独立看门狗和窗口看门狗).Systick定时器:IIIV位倒计数器.II个I.VI位基本定时器用于驱动DAC.
(I.I.)最多多达I.III个通信接口:II个IIC接口(SMBus/PMBus).V个USART接口(ISOVIIVIIII.VI接口,LIN,IrDA兼容,调试控制).III个SPI接口(I.VIIIMbit/s),两个和IIS复用.CAN接口(II.0B).USBII.0全速接口.SDIO接口.
(I.II)ECOPACK封装:STMIIIIIFI.0IIIxx系列微控制器采用ECOPACK封装形式.
(VI)架构优势
除新增的功能强化型外设接口外,STMIIIII互连系列还提供与其它STMIIIII微控制器相同的标准接口,这种外设共用性提升了整个产品家族的应用灵活性,使开发人员可以在多个设计中重复使用同I.个软件.新STMIIIII的标准外设包括I.0个定时器.两个I.II位I.-Msample/s模数转换器(交错模式下II-Msample/s).两个I.II位数模转换器.两个IIIC接口.V个USART接口和III个SPI端口.新产品外设共有I.II条DMA通道
新系列微控制器还沿续了STMIIIII产品家族的低电压和节能两大优点.II.0V到III.VIV的工作电压范围兼容主流的电池技术,如锂电池和镍氢电池,封装还设有I.个电池工作模式专用引脚Vbat.以VIIIIMHz频率从闪存执行代码,仅消耗IIVIImA电流.低功耗模式共有IV种,可将电流消耗降至两微安.从低功耗模式快速启动
II.火车站电子时钟简介
火车站电子时钟为乘客乘车提供方便,在提醒广大乘客火车发车时间上发挥举足轻重的作用.在目前的国内外市场中,Clockproductrange,但他们大多存在I.个致命缺点即价格低廉的精度低.体积大,而精度高体积小的却价格昂贵,在智能化方面也存在I.定问题.本单片机的电子时钟系统的设计旨在解决上述缺点折合为I.个适中的产品实现高精度.小体积.低价格.易操作等优点,为火车站火车发车时间,提醒乘客上车时间提供方便.
(I.)背景介绍
从古代的沙漏计时,到现在的机械钟表.石英钟,计时技术得发展经过了I.个漫长的完善过程,这充分显现出了时间不论对古人还是现在的我们的重要性.现在,全球社会都进入了信息化时代,人们更加重了对时间计量精度的依赖,以至于钟表应用越来越广,功能越来越多.普通的机械表对于当代人复杂繁琐的要求显然早已不太适应,电子时钟应运而生.电子时钟不仅能满足基本时间要求,而且体积小,成本低廉,最大的亮点在于可以随时根据不同的客户要求进行改进.增加功能,所以电子钟越来越受到人们的青睐.
(II)功能实现
由于单片机有价格实惠而且功能齐全的优点,在自动控制产品中广泛应用.本设计STMIIIII设计火车站电子时钟,通过LCD液晶屏完成其显示.计时.提示乘客上车功能,本设计实现了所需功能的硬件电路,并应用C语言进行软件编程.
附件II:外文原文
STMIIIII-baseddesignofthetrainstationelectronicclock
(liujun,BeihangUniveristypress,II0I.III)
A.IntroductionofSTMIIIII
STMIIIIIisbasedonthefamilyofARMCortex-MIIIcore-designedspecificallyforembeddedapplicationsthatrequirehighperformance,lowcost,lowpowerconsumption.Theperformanceisdividedintotwodifferentseries:STMIIIIIFI.0IIIthe"Enhanced"seriesandSTMIIIIIFI.0I.the"Basic"series.TheclockfrequencyofEnhancedSeriesisuptoVIIIIMHz,thehighestperformanceofsimilarproducts;theclockfrequencyofBasicSeriesisIIIVIMHz,andthepricesofI.VIpositionproductssignificantlyenhancetheperformanceofmorethanI.VIpositionproducts,isthebestchoiceuserstobuythem.Thetwoseriesarebuilt-inflashfromIIIIIKtoI.IIVIIIK,isthecombinationofthemaximumcapacityoftheSRAMandperipheralinterfaces.WhentheclockfrequencyreachesVIIIIMHz,itexecutesfromFlashandtheSTMIIIIIpowerconsumptionisIIIVImA,thelowestpowerconsumptionintheIIIII-bitmarketproducts,theequivalentanimpressive0.VmA/MHz.
a.STMicroelectronicsGroup
STMicroelectronicsGroupwasestablishedinJuneI.IXVIIIVII,isamergerofItalysSGSMicroelectronicsandtheFrenchThomsonsemiconductorcompany.InMayI.IXIXVIII,SGS-THOMSONMicroelectronicswillchangethecompanynametoSTMicroelectronicsLimited.STMicroelectronicsisoneofthelargestsemiconductorcompaniesintheworld.Fromitsinceptiontodate,STsgrowingfasterthantheoverallrateofgrowthofthesemiconductorindustry.SinceI.IXIXIX,SThasalwaysbeenoneoftheworldstoptensemiconductorcompanies.Accordingtothelatestindustrystatistics,STMicroelectronicsistheworldsfifthlargestsemiconductormanufacturerandaworldleaderinmanymarkets.Forexample,STMicroelectronicsistheworldslargestdedicatedanalogchipsandpowerconversionchipmanufacturers,theworldslargestindustrialsemiconductorandset-topboxchipsuppliersanddiscretedevices,mobilephonecameramoduleandcarfieldofintegratedcircuitshighestintheworld.
STMicroelectronicshastheentiregroupemploysnearlyV0,000,withI.VIstate-of-the-artR&DinstitutionsandIIIIXdesignandapplicationcenters,I.Vmainmanufacturingplant,andhasVIIVIIIsalesofficesinIIIVIcountries.ThecompanyisheadquarteredinGeneva,Switzerland,isalsotheheadquartersofEuropeanandemergingmarkets;companysU.S.headquartersinDallas,Texas,Carrollton;Asia-PacificheadquartersinSingapore;businessinJapanbyTokyoasaheadquarters;GreaterChinaheadquartersinShanghai,responsibleforbusinessinHongKong,mainlandChinaandTaiwan.
DecemberVIII,I.IXIXIVforthefirsttimesincethecompletionofthepublicofferingofshares,STMicroelectronicshasbeeninNewYorkStockExchange(tickersymbol:STM)andPanOuBaliStockExchangelisted,inJuneI.IXIXVIII,inMilan,Italy,securitiesExchange.STMicroelectronicshasnearlyIX00millionsharesinthepublicofferingofshares,ofwhichapproximatelyVIII..I.%ofthesharesarepubliclytradedonthevariousstockexchanges.AnotherIIVII.V%ofthestockbySTMicroelectronicsHoldingIIBVLimitedhelditsshareholdersFinmeccanicaandCDPItalianFinmeccanicaconsortiumArevaandFranceTelecom,theFrenchconsortium;remainingI..IV%oftreasurysharesbySTMicroelectronicshold.
b.STultra-low-powerARM?Cortex?-MIIImicrocontroller
STMIIIIILseriesofproductsarebasedontheultra-low-powerARMCortex-MIIIprocessorcore,STMicroelectronicstwouniqueenergy-savingtechnologies:I.III0nmdedicatedlow-leakagecurrentmanufacturingprocessandoptimizeenergy-savingarchitecturetodeliverindustry-leadingenergy-savingperformance.ThisseriesbelongstothelineupIIIIISTMicroelectronicsSTMIIIIImicrocontrollerproductfamily,theproductfamily,atotalofI.VIII0balanceofproduct,thefullrangeofproductssharemostofthepin,softwareandperipherals,excellentcompatibilitywithdeveloperstothemaximumdesignflexibility.
c.STultra-low-powerARM?Cortex?-M0microcontroller
STMIIIIIF0seriesofproductsarebasedontheultra-low-powerARMCortex-M0processorcoretechnologyandfeatures,enhancedintegration,aimedattheapplicationofultra-low-costbudget.ThefamilyofmicrocontrollerstoshortentheVIII-bitandI.VI-bitmicro-controllerdevicesandtheperformancegapbetweentheIIIII-bitmicrocontrollerdevice,theuserterminalproductsintheeconomytoachievestate-of-the-artcomplexfeatures.
d.Products
BeforeSTMIIIIIFI.0VandSTMIIIIIFI.0VIIinterconnectfamilyofmicrocontrollers,STMicroelectronicshasintroducedtheSTMIIIIIAccessLineEnhancedSeries,theseriesoftheUSBbasicseriesandenhanced;newproductsfollowtheEnhancedSeriesVIIIIMHzprocessingfrequency.MemoryVIIVKBtoIIVVIKBFlashandII0KBtoVIIVKBembeddedSRAM.TheLQFPVIIV,LQFPI.00,andLFBGAI.00threepackageinthenewseries,adifferentpackagetomaintainthepinoutconsistency,combinedwiththeSTMIIIIIplatformdesignphilosophy,anddevelopersbyselectingtheproductscanbere-optimizationfunction,memory,performanceandpincount,withaminimumofhardwarechangestomeetindividualapplicationneeds.
e.STMIIIIIFI.0IIIperformancecharacteristics
(I.)Thekernel:ARMIIIII-bitCortex-MIIICPU,themaximumoperatingfrequencyofVIIIIMHz,I..IIVDMIPS/MHz.Single-cyclemultiplyandhardwaredivision.
(II)Memory:integratedon-chipIIIII-VI.IIKBofFlashmemoryandVI-VIIVKBSRAMmemory.
(III)Clockresetandpowermanagement:II.0-III.VIVdrivevoltageofthepowersupplyandI/Ointerface,POR,PDRandprogrammablevoltagedetector(PVD),IV-I.VIMHzcrystaloscillator,embeddedVIIIMHzRCoscillatortuningcircuitinthefactory,IV0kHzinternalRCoscillatorcircuit.FortheCPUclockPLL.WiththecalibrationfortheRTCIIIIIkHzcrystal.
(IV)Lowpowerconsumption:threekindsoflow-powermodes:Sleep,stop,standbymode.PoweredtheVBATRTCandbackupregisters.
(V)Debugmode:serialdebug(SWD)andJTAGinterfaces.
(VI)DMA:I.II-channelDMAcontroller;supportedperipherals:timers,ADC,DAC,SPI,IICandUSART.
(VII)III.IIusclassA/Dconverter(I.VI-channel):A/Dmeasurementrange:0-III.VIV.Dualsampleandholdcapability.Thechipintegratesatemperaturesensor.
(VIII)II-channelI.II-bitD/Aconverter:STMIIIIIFI.0IIIxCSTMIIIIIFI.0IIIxDSTMIIIIIFI.0IIIxEunique.
(IX)AmaximumofuptoI.I.IIfastI/Oports:Dependingonthemodel,IIVI,IIIVII,VI.,VIII0,andI.I.III/Oports,allportscanbemappedtotheI.VIexternalinterruptvectors.InadditiontotheanaloginputcanacceptlessthanVVinput.
(I.0)AmaximumofuptoI.I.timers:fourI.VI-bittimers,eachtimerIVIC/OC/PWMorpulsecounter.TwoI.VI-channeladvancedcontroltimer:uptoVIchannelsforPWMoutput.IIwatchdogtimers(independentwatchdogandwindowwatchdog).Systicktimer:IIIV-bitdowncounter.TwoI.VI-bitbasictimersareusedtodrivetheDAC.
(I.I.)AmaximumofuptoI.IIIcommunicationinterfaces:twoIICinterface(SMBus/PMBus),VUSARTinterface(ISOVIIVIIII.VIinterface,LIN,IrDAcompatible,thedebuggingcontrol),ThreeSPIinterface(I.VIIIMbit/s),twoandIISreuse,CANinterface(II.0B),USBII.0full-speedinterface,SDIOinterface.
(I.II)ECOPACKpackage:STMIIIIIFI.0IIIxxfamilyofmicrocontrollersECOPACKpackage.
f.Architecturaladvantages
Inadditiontothenewfeaturesenhancedperipheralinterface,STMIIIIIinterconnectionseriesalsoprovidethesamestandardinterfacewithotherSTMIIIIImicrocontrollersharedthisperipheralenhanceapplicationflexibilityoftheentireproductfamily,sothatdeveloperscanmultipledesignstorepeateduseofthesamesoftware.NewSTMIIIIIstandardperipheralsincludeI.0timers,twoI.II-Msample/sanalog-to-digitalconverter(InterleavedII-Msample/smode),twoI.II-bitdigital-to-analogconverters,twoIIICinterfacefivetheUSARTinterfaceandthreeSPIports.AtotalofI.IInewproductsperipheralDMAchannels,thereisaCRCcalculationunit,likeotherSTMIIIIImicrocontrollersupportsIXVIuniqueidentificationnumber.
ThenewfamilyofmicrocontrollersalsohasfollowedtheSTMIIIIIproductfamilyoflow-voltageandenergy-savingadvantages.TheoperatingvoltagerangeofII.0VtoIII.VIV,compatiblewithmainstreambatterytechnology,suchaslithiumbatteriesandnickel-metalhydridebatteries,thepackagealsofeaturesabatterymodededicatedpinVbat.VIIIIMHzfrequencycodeexecutionfromflashconsumesonlyIIVIImAofcurrent.Low-powermode,therearefour;thecurrentconsumptioncanbereducedtotwomicroamps.Faststartfromthelow-powermodetosaveenergy;startcircuitSTMIIIIIinternallygeneratedVIIIMHzsignaltowakeupthemicrocontrollerfromstopmodewithlessthanVImicroseconds.
B.Introduceelectronicclocktrainstation
Trainelectronicclocktofacilitatepassengerstraveling,Playapivotalroletoremindthemajorityofpassengersonthetraindeparturetime.Inthecurrentdomesticandinternationalmarkets,Clockproductrange,Butmostofthemthereisafatalflawthatlowlowpriceaccuracy,bulky,Thehighprecisionsmallbutexpensive,Therearesomeproblemsintermsofintelligence.Thedesignofmicrocontrollerbasedelectronicclocksystemisdesignedtoaddresstheseshortcomingsequivalenttoamoderate-precisionproductstoachievetheadvantagesofsmallsize,lowpriceandeasyoperation,thetraindeparturetimeforthetrainstationtoremindpassengersonthetrainoftimewithease.
a.Backgroundintroduction
Fromancienthourglasstimer,andnowmechanicalwatches,quartz,Timingtechnologywasdevelopedthroughalongprocessofimprovement,whichfullyshowwhetherthetimeisnowforourancientimportance.Now,theglobalcommunityhasenteredtheinformationage,peoplearemoreheavyrelianceontheaccuracyoftimemeasurement,sowatchmorewidely,moreandmorepowerful.Ordinarymechanicalwatchforcontemporarycomplexandcumbersomerequirementsapparentlyhadnotadapt,electronicclockcameintobeing.Electronictimeclockcannotonlymeetthebasicrequirements,andsmallsize,lowcost,thebiggestbrightspotisthatitcanalwaysbeimprovedbyaddingfeaturesaccordingtodifferentcustomerrequirements,sotheelectronicclockmoreandmorepeopleofallages.
b.Functionstoachieve
Duetothemicrocontrolleratanaffordablepriceandfunctionaladvantages,theproductiswidelyusedinautomaticcontrol.ThedesignisbasedSTMIIIIIDesignStationelectronicclock,throughthecompletionofitsLCDscreendisplay,timing,tipsonpassengercarfeatures,designedtoachievethedesiredfunctionalityofthehardwarecircuitryandsoftwareapplicationsinClanguageprogramming.
版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/lwqt/wxzs/214.html