andComplimentaryMode.BysettingthecorrespondingbitCPWMinregisterPWMCONshowninFig.usercanselectoneofthetwooperationmodes.WhenCPWMissettozero,PWMmodulewillworkinIndependentMode,whereas,PWMmodulewillworkinComplimentaryMode.Inthe外文翻译followingofthissection,thetwooperationmodewillbeexplainedrespectivelyindetailandthesimulationresultsofthePWMmodulefromtheSynoposysVCSEDAplatformwhichverifythedesignwillalsoocks.Sectiondescribestwooperationmodes.Experimentalandsimulationresultsverifyingpropersystemoperationarealsoshowninthatsection.Dependingonmodeofoperation,thePWMmodulecreatesoneormorepulse-widthmodulatedsignals,whosedutyratioscanbeindependentlyadjusted.ImplementationofPWMmoduleinMCUOverviewofthePWMmoduleAblockdiagramofPWMmoduleisshowninFig..Itisclearlyfromthediagramthatthewholemoduleiscomposedoftwosections:PWMsignalgeneratoranddead-timegeneratorwithchannelselectlogic.ThePWMfunctioncanbestartedbytheuserthroughimplementingsomeinstructionsforinitializingthePWMmodule.Inparticular,thefollowingpowerandmotioncontrolapplicationsaresupported:•DCMotor•UninterruptablelPowerSupply(UPS)ThePWMmodulealsohasthefollowingfeatures:•TwoPWMsignaloutputswithcomplementaryorindependentoperation•Hardwaredead-timegeneratorsforcomplementarymode外文翻译•DutycycleupdatesareconfigurabletobeimmediatedorsynchronizedtothePWMFig.ArchitectureofPWMModuleDetailsofthearchitecturePMWgeneratorThearchitectureofthe-outputPWMgeneratorshowninFig.isbasedona-bitresolutioncounterwhichcreatesapulse-widthmodulatedsignal.ThesystemissynthesizedbyasystemclocksignalwhosefrequencycanbedividedbytimesortimesthroughsettingthevalueofTMforPWMorTMforPWMinthespecialregisterPWMCONasshowninFig..ToPWMgenerator,theclockto-bitcounterwillbepre-dividedbytimesbydefaultwhenTMissettozero.AndtheclockwillbedividedbytimeswhenTMissetto.ThisisalsotrueforPWM.TheotherbitsinPWMCONareexplainedindetailinTable.Fig.BitMappingofPWMCON外文翻译Table:TheBitDefinitioninPWMCONChannel-selectlogicThefollowFig.showsthechannel-selectlogicwhichisusefulinComplementaryMode.Fromthisdiagram,itiscleartoknowthatsignalCPandCPWMcontrolthesourceofPWMHandPWML.Andthedetailsaboutthetwocontrolsignalswillbediscussedinthesection,andthearchitectureofdead-timegeneratorwillalsobediscussedinsectionforthecontinuityofComplementaryMode.Fig.DiagramofChannel-selectLogicOperationModeandSimulationResultsThedesignhastwooperationmodes:IndependentModeandComplimentaryMode.BysettingthecorrespondingbitCPWMinregisterPWMCONshowninFig.usercanselectoneofthetwooperationmodes.WhenCPWMissettozero,PWMmodulewillworkinIndependentMode,whereas,PWMmodulewillworkinComplimentaryMode.Inthe外文翻译followingofthissection,thetwooperationmodewillbeexplainedrespectivelyindetailandthesimulationresultsofthePWMmodulefromtheSynoposysVCSEDAplatformwhichverifythedesignwillalso模块产生,只有当需要改变占空比时候CPU失控,这样就不能产生PWM信号,否则通过在单片机里外文翻译嵌入PWM功能模块,并使这功能初始化,单片机PWM口也能自动产生PWM信号。这种方法将在文章中讲述。在本文中,我们建议在单片机里嵌入一个PWM模块。该PWM模块,通过初始化控制寄存器和寄存器占空比,可以支持PWM脉冲信号,用刚才提到上述三种方法调整占空比和几个操作模式,以增加用户弹性。以下这部分解释PWM模块和基本功能模块结构。第三部分描述两种操作模式。这部分还讲述了实验和仿真结果验证了合适系统操作。通过操作模式,PWM模块产生一个或更多脉宽模块信号,它们比率可以自主调整。在单片机上执行PWM模块PWM模块概述PWM模块如图所示,从图中,可以很清楚得看到整个模块有两部分组成:PWM信号产生器和带有频道选择逻辑死区时间产生器。用户可以通过执行一些代码使PWM模块初始化,从而启动其功能。在特殊情况下,支持以下电源和运动控制应用:.直流电机.持续电源供应PWM模块也有以下特征:.两个PWM输出信号以互补或独立方式运行.带有互补模式硬件死区电动机.占空比更新设置应立刻或与PWM同步图PWM模块结构结构详细组成外文翻译PWM电动机二输出PWM电动机结构如图.所示,该结构是基于能产生脉宽调制信号上位计数器。该系统由四分频或十二分频系统时钟信号合成,时钟信号频率可通过对在特殊寄存器PWMCON中PWM电机TM或PWM电机TM值进行设置而调整,如图所示:对于PWM电机,当TM设置为零时,位计数器时钟将被默认预分为四分频,当TM设置为时,始终将被十二分频;PWM同样有这种功能。在PWMCON中其它位定义,详见表图PWMCON位位置表:PWMCON位定义通道选择逻辑通道选择逻辑在互补模式中很有用,如图所示。从表中可以清楚得看出,信号CP和CPWM控制PWM和PWML来源,这两个控制信号详细情况将在第三部分讲述,死区时间电机结构也将在一下部分连续性互补模式中讲述。外文翻译图通道选择逻辑表运行模式和仿真结果这种设计有两种运行模式:独立模式和互补模式。通过在PWMCON寄存器中设置相应位CPWM,如图四所示,用户可以选择其中一个运行模式。当CPWM设置为时,PWM模式将工作在独立模式,COWM设置为时,将工作在互补模式。在这部分两种模式将分别被详细讲述,从VCSEDA平台PWM模块仿真结果证明这种设计。独立PWM输出模块独立PWM输出模块对于驱动负荷很有用,如图所示。当在PWMCON寄存器中相应CP位设置为,特殊PWM输出模块是在独立输出模式里。在这种情况下,PWM两种通道输出是相互独立。在PWM/PWML口信号是从PWM电机产生。通道选择逻辑完成单独情况,如图所示。PWMI/O口通过默认意见复位设置为独立模式,但死区时间电机不能在独立模式下工作。仿真结果如图所示。Tr和Tr分别与PWM和PWM相连,实际上,从图看,单片机P[]/P[]口被用做PWMH/PWML或是一般I/O口。图独立模式下PWM波形互补PWM输出模式互补输出模式可以用于驱动逆变器负载,如图所示。这种逆变器拓扑学是典型外文翻译直流装置。在互补输出模式,PWM两个输出不能同时用。PWM通道和输出口都是通过通道选择逻辑内部配置,如图所示。死区时间是在两端输出开关装置没有工作短时期时可以选择插入。图PWM互补输出典型电路PWMI/O口通过在PWMCON中设置适当CPWM位选择互补模式,在这种情况下,PSWL是有效果。当PSEL设置为时,PWMH和PWML将来自PWM电机,这时来自PWM电机信号是没用,而当PSEL设置为时,PWMH和PWML将来自PWM电机,这时来自PWM电机信号是没用。在互补模式时产生PWM输出信号过程中,死区时间将被插入在以下这部分讲述。死区时间控制当PWMI/O口在互补输出模式运行时,死区时间是自动启用生成,因为电源输出装置不能瞬间开关,在互补对模式下,一个PWM输出关闭与其它晶体管打开之间要一定时间,输出PWM模块有一个带有位寄存器可编程死区时间。PWM模块互补输出对已有一个用于产生死区时间插入位计数器。死区时间单元有一个上升沿和下降沿探测器,而这个探测器与PWM电机产生PWM信号连接。当到达PWM边沿时,死区时间被载入计时器,根据是否是上升沿或下降沿,在互补输出端口上其中一个过度被延迟,直到计数器降为。PWM输出对死区时间表,如图a所示:外文翻译图a死区时间单元模块图图b互补模式PWM输出波形总结:本文,我们设计了基于位兼容单片机PWM模块,这种设计能产生通道带有两种运行模式可编程周期PWM信号,即可插入死区时间独立模式和互补式。这种在EDA平台仿真结果已证明了它和谐性和有用性。ocks.Sectiondescribestwooperationmodes.Experimentalandsimulationresultsverifyingpropersystemoperationarealsoshowninthatsection.Dependingonmodeofoperation,thePWMmodulecreatesoneormorepulse-widthmodulatedsignals,whosedutyratioscanbeindependentlyadjusted.ImplementationofPWMmoduleinMCUOverviewofthePWMmoduleAblockdiagramofPWMmoduleisshowninFig..Itisclearlyfromthediagramthatthewholemoduleiscomposedoftwo外文翻译附录A英文原文DesignofPWMControllerinaMCS-CompatibleMCUAuthor.Yue-LiHu,WeiWangMicroelectronicResearch&DevelopmentCenterCampusP.O.B.,YanchangRd,Shanghai,ChinaIntroductionPWMtechnologyisakindofvoltageregulationmethodbycontrollingtheswitchfrequencyofDCpowerwithfixedvoltagetomodifythetwo-endvoltageofload.Thistechnologycanbeusedforavarietyofapplicationsincludingmotorcontrol,temperaturecontrolandpressurecontrolandsoon.InthemotorcontrolsystemshownasFig.,throughadjustingthedutycycleofpowerswitch,thespeedofmotorcanbecontrolled.AsshowninFig.,underthecontrolofPWMsignal,theaverageofvoltagethatcontrolsthespeedofmotorchangeswithDuty-cycle(D=t/TinthisFigure),thusthemotorspeedcanbeincreasedwhenmotorpowerturnon,decreasedwhenpowerturnoff.Fig.:TheRelationshipbetweenVoltageofArmatureandFig.ArchitectureofPWMModuleTherefore,themotorspeedcanbecontrolledwithregularlyadjustingthetimeofturn-onandturn-off.Therearethreemethodscouldachievetheadjustmentofdutycycle:()Adjustfrequencywithfixedpulse-width.()Adjustbothfrequencyandpulse-width.()Adjustpulse-widthwithfixedfrequency.Generally,therearefourmethodstogeneratethePWMsignalsasthefollowing:()Generatedbythedevicecomposedofseparatelogiccomponents.Thismethodistheoriginalmethodwhichnowhasbeendiscarded.()Generatedbysoftware.ThismethodneedCPUto外文翻译continuouslyoperateinstructionstocontrolI/OpinsforgeneratingPWMoutputsignals,sothatCPUcannotdoanythingother.Therefore,themethodalsohasbeendiscardedgradually.()GeneratedbyASIC.TheASICmakesadecreaseofCPUburdenandsteadyworkgenerallyhasseveralfunctionssuchasover-currentprotection,dead-timeadjustmentandsoon.Thenthemethodhasbeenwidelyusedinmanykindsofoccasionnow.()GeneratedbyPWMfunctionmoduleofMCU.ThroughembeddingPWMfunctionmoduleinMCUandinitializingthefunction,PWMpinsofMCUcanalsoautomaticallygeneratePWMoutsignalswithoutCPUcontrollingonlywhenneedtochangeduty-cycle.Itisthemethodthatwillbeimplementedinthispaper.Inthispaper,weproposeaPWMmoduleembeddedinamicrocontroller.ThePWMmodulecansupportPWMpulsesignalsbyinitializingthecontrolregisterandduty-cycleregisterwiththreemethodsjustmentionedabovetoadjustthedutycycleandseveraloperationmodestoaddflexibilityforuser.ThefollowingsectionexplainsthearchitectureofthePWMmoduleandthearchitecturesofbasicfunctionalblocks.Sectiondescribestwooperationmodes.Experimentalandsimulationresultsverifyingpropersystemoperationarealsoshowninthatsection.Dependingonmodeofoperation,thePWMmodulecreatesoneormorepulse-widthmodulatedsignals,whosedutyratioscanbeindependentlyadjusted.ImplementationofPWMmoduleinMCUOverviewofthePWMmoduleAblockdiagramofPWMmoduleisshowninFig..Itisclearlyfromthediagramthatthewholemoduleiscomposedoftwosections:PWMsignalgeneratoranddead-timegeneratorwithchannelselectlogic.ThePWMfunctioncanbestartedbytheuserthroughimplementingsomeinstructionsforinitializingthePWMmodule.Inparticular,thefollowingpowerandmotioncontrolapplicationsaresupported:•DCMotor•UninterruptablelPowerSupply(UPS)ThePWMmodulealsohasthefollowingfeatures:•TwoPWMsignaloutputswithcomplementaryorindependentoperation•Hardwaredead-timegeneratorsforcomplementarymode外文翻译•DutycycleupdatesareconfigurabletobeimmediatedorsynchronizedtothePWMFig.ArchitectureofPWMModuleDetailsofthearchitecturePMWgeneratorThearchitectureofthe-outputPWMgeneratorshowninFig.isbasedona-bitresolutioncounterwhichcreatesapulse-widthmodulatedsignal.ThesystemissynthesizedbyasystemclocksignalwhosefrequencycanbedividedbytimesortimesthroughsettingthevalueofTMforPWMorTMforPWMinthespecialregisterPWMCONasshowninFig..ToPWMgenerator,theclockto-bitcounterwillbepre-dividedbytimesbydefaultwhenTMissettozero.AndtheclockwillbedividedbytimeswhenTMissetto.ThisisalsotrueforPWM.TheotherbitsinPWMCONareexplainedindetailinTable.Fig.BitMappingofPWMCON外文翻译Table:TheBitDefinitioninPWMCONChannel-selectlogicThefollowFig.showsthechannel-selectlogicwhichisusefulinComplementaryMode.Fromthisdiagram,iti 外文翻译1附录A英文原文DesignofPWMControllerinaMCS-51CompatibleMCUAuthor.Yue-LiHu,WeiWangMicroelectronicResearch&DevelopmentCenterCampusP.O.B.221,149YanchangRd,Shanghai200072,ChinaIntroductionPWMtechnologyisakindofvoltageregulationmethodbycontrollingtheswitchfrequencyofDCpowerwithfixedvoltagetomodifythetwo-endvoltageofload.Thistechnologycanbeusedforavariety