


全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1-4244-1253-6/07/$25.002007IEEEProceedingsofHDP07DesignofPWMControllerinaMCS-51CompatibleMCUYue-LiHu,WeiWangMicroelectronicResearch&DevelopmentCenter,KeyLaboratoryofAdvancedDisplayandSystemApplications(ShanghaiUniversity),MinistryofEducationCampusP.O.B.221,149YanchangRd,Shanghai200072,ChinaE-mail:AbstractThispaperpresentsadesignofPulse-WidthModulated(PWM)controllermoduleinaMCUbasedonMCS-51structure.Thedesigncangenerate2-channelprogrammableperiodicPWMsignals.TheseoutputPWMsignalsfromMCUcanbeusedforavarietyofapplicationsincludingmotorcontrol.Thefunctionofthedesignallowsuserstoselectindependentorcomplementaryinversiontimingrelationshipsbetween2PWMwaveforms.ThelattermodeselectionalsoincludesoptionaldeadtimefunctiontosupportdrivingH-bridgesandinverters.Therefore,userscancontroltheoutputPWMsignalsthroughsettingtheduty-cycleregisters.Afterthesuccessfulsimulationatthefrontend,practicalexperimentsmadeonaNIOSdevelopmentboardverifythedesign.1.IntroductionPWMtechnologyisakindofvoltageregulationmethodbycontrollingtheswitchfrequencyofDCpowerwithfixedvoltagetomodifythetwo-endvoltageofload.Thistechnologycanbeusedforavarietyofapplicationsincludingmotorcontrol,temperaturecontrolandpressurecontrolandsoon.InthemotorcontrolsystemshownasFig.1,throughadjustingthedutycycleofpowerswitch,thespeedofmotorcanbecontrolled.AsshowninFig.2,underthecontrolofPWMsignal,theaverageofvoltagethatcontrolsthespeedofmotorchangeswithDuty-cycle(D=t1/TinthisFigure),thusthemotorspeedcanbeincreasedwhenmotorpowerturnon,decreasedwhenpowerturnoff.Fig.1PWMcontrolblockdiagramFig.2:TheRelationshipbetweenVoltageofArmatureandDuty-cycleTherefore,themotorspeedcanbecontrolledwithregularlyadjustingthetimeofturn-onandturn-off.Therearethreemethodscouldachievetheadjustmentofdutycycle:(1)Adjustfrequencywithfixedpulse-width.(2)Adjustbothfrequencyandpulse-width.(3)Adjustpulse-widthwithfixedfrequency.Generally,therearefourmethodstogeneratethePWMsignalsasthefollowing:(1)Generatedbythedevicecomposedofseparatelogiccomponents.Thismethodistheoriginalmethodwhichnowhasbeendiscarded.(2)Generatedbysoftware.ThismethodneedCPUtocontinuouslyoperateinstructionstocontrolI/OpinsforgeneratingPWMoutputsignals,sothatCPUcannotdoanythingother.Therefore,themethodalsohasbeendiscardedgradually.(3)GeneratedbyASIC.TheASICmakesadecreaseofCPUburdenandsteadyworkgenerallyhasseveralfunctionssuchasover-currentprotection,dead-timeadjustmentandsoon.Thenthemethodhasbeenwidelyusedinmanykindsofoccasionnow.(4)GeneratedbyPWMfunctionmoduleofMCU.ThroughembeddingPWMfunctionmoduleinMCUandinitializingthefunction,PWMpinsofMCUcanalsoautomaticallygeneratePWMoutsignalswithoutCPUcontrollingonlywhenneedtochangeduty-cycle.Itisthemethodthatwillbeimplementedinthispaper.Inthispaper,weproposeaPWMmoduleembeddedina8051microcontroller.ThePWMmodulecansupportPWMpulsesignalsbyinitializingthecontrolregisterandduty-cycleregisterwiththreemethodsjustmentionedabovetoadjustthedutycycleandseveraloperationmodestoaddflexibilityforuser.ThefollowingsectionexplainsthearchitectureofthePWMmoduleandthearchitecturesofbasicfunctionalblocks.Section3describestwooperationmodes.Experimentalandsimulationresultsverifyingpropersystemoperationarealsoshowninthatsection.Dependingonmodeofoperation,thePWMmodulecreatesoneormorepulse-widthmodulatedsignals,whosedutyratioscanbeindependentlyadjusted.2.ImplementationofPWMmoduleinMCU2.1OverviewofthePWMmoduleAblockdiagramofPWMmoduleisshowninFig.3.Itisclearlyfromthediagramthatthewholemoduleiscomposedoftwosections:PWMsignalgeneratoranddead-timegeneratorwithchannelselectlogic.ThePWMfunctioncanbestartedbytheuserthroughimplementingsomeinstructionsforinitializingthePWMmodule.Inparticular,thefollowingpowerandmotioncontrolapplicationsaresupported:DCMotorUninterruptablelPowerSupply(UPS)ProceedingsofHDP07Fig.3ArchitectureofPWMModuleThePWMmodulealsohasthefollowingfeatures:TwoPWMsignaloutputswithcomplementaryorindependentoperationHardwaredead-timegeneratorsforcomplementarymodeDutycycleupdatesareconfigurabletobeimmediatedorsynchronizedtothePWM2.2Detailsofthearchitecture2.2.1PMWgeneratorThearchitectureofthe2-outputPWMgeneratorshowninFig.3isbasedona16-bitresolutioncounterwhichcreatesapulse-widthmodulatedsignal.Thesystemissynthesizedbyasystemclocksignalwhosefrequencycanbedividedby4timesor12timesthroughsettingthevalueofT3MforPWM0orT4MforPWM1inthespecialregisterPWMCONasshowninFig.4.ToPWM0generator,theclockto16-bitcounterwillbepre-dividedby4timesbydefaultwhenT3Missettozero.Andtheclockwillbedividedby12timeswhenT3Missetto1.ThisisalsotrueforPWM1.TheotherbitsinPWMCONareexplainedindetailinTable1.Fig.4BitMappingofPWMCONTable1:TheBitDefinitioninPWMCONBITDescriptionTF4InterruptRequestforPWM0TR4RUNbitforPWM0TF3InterruptRequestforPWM1TR3RUNbitforPWM1PSELChannelSelectinComplementaryModeCPWMModeSelectT4MClockPrescalerforPWM1T3MClockPrescalerforPWM02.2.2Channel-selectlogicThefollowFig.5showsthechannel-selectlogicwhichisusefulinComplementaryMode.Fromthisdiagram,itiscleartoknowthatsignalCPandCPWMcontrolthesourceofPWMHandPWML.Andthedetailsaboutthetwocontrolsignalswillbediscussedinthesection3,andthearchitectureofdead-timegeneratorwillalsobediscussedinsection3.1forthecontinuityofComplementaryMode.Fig.5DiagramofChannel-selectLogic3.OperationModeandSimulationResultsThedesignhastwooperationmodes:IndependentModeandComplimentaryMode.BysettingthecorrespondingbitCPWMinregisterPWMCONshowninFig.4,usercanselectoneofthetwooperationmodes.WhenCPWMissettozero,PWMmodulewillworkinIndependentMode,whereas,PWMmodulewillworkinComplimentaryMode.Inthefollowingofthissection,thetwooperationmodewillbeexplainedrespectivelyindetailandthesimulationresultsofthePWMmodulefromtheSynoposysVCSEDAplatformwhichverifythedesignwillalsobeshown.3.1IndependentPWMOutputModeAnIndependentPWMOutputmodeisusefulfordrivingloadssuchastheoneshowninFigure1.AparticularPWMoutputisintheIndependentOutputmodewhenthecorrespondingCPbitinthePWMCONregisterissettozero.Inthiscase,two-channelPWMoutputsareindependentofeachother.ThesignalonpinPWM0/PWMHisfromPWM0generator,andthesignalonpinPWM1/PWMLisfromPWM0generator.Theseparatecaseisachievedbythechannel-selectlogicshowninFig.6.ThePWMI/Opinsaresettoindependentmodebydefaultuponadvicereset.Thedead-timegeneratorisdisabledintheIndependentmode.ThesimulationresultisshowninFigure4asthefollowingFig.5.Tr4andtr3arerunbitstoPWM0andPWM1,respectively.Actually,fromthisdiagram,PinP15/P14ofMCUisusedforPWMH/PWMLornormalI/O,alternatively.Fig.6theWaveformofPWMOutputsinIndependentMode3.2ComplementaryPWMOutputModeTheComplementaryOutputmodeisusedtodriveinverterloadssimilartotheoneshowninFigure7.ThisinvertertopologyistypicalforDCapplications.InComplementaryOutputMode,thepairofPWMoutputscannotbeactivesimultaneously.ThePWMchannelandoutputpinpairareinternallyconfiguredthroughchannel-selectlogicasshowninFigure5.Adead-timemaybeoptionallyinsertedduringdeviceswitchingwherebothoutputsareinactiveforashortperiod.ProceedingsofHDP07Fig7:TypicalLoadforComplementaryPWMOutputsTheComplementarymodeisselectedforPWMI/OpinpairbysettingtheappropriateCPWMbitinPWMCON.Inthiscase,PSELisineffect.PWMHandPWMLwillcomefromPWM0generatorwhenPSELissettozero,whenthesignalsfromPWM1generatorisuseless,whereasPWMHandPWMLwillcomefromPWM1generatorwhenPSELissetto1,whenthesignalsfromPWM0generatorisuseless.IntheprocessofproducingthePWMoutputsinComplementaryMode,thedead-timewillbeinsertedtobediscussedinthefollowingsection.3.3Dead-timeControlDead-timegenerationisautomaticallyenabledwhenPWMI/OpinpairisoperatingintheComplementaryOutputmode.Becausethepoweroutputdevicescannotswitchinstantaneously,someamountoftimemustbeprovidedbetweentheturn-offeventofonePWMoutputinacomplementarypairandtheturn-oneventoftheothertransistor.The2-outputPWMmodulehasoneprogrammabledead-timewith8-bitregister.ThecomplementaryoutputpairforthePWMmodulehasan8-bitdowncounterthatisusedtoproducethedead-timeinsertion.AsshowninFigure8,thedeadtimeunithasarisingandfallingedgedetectorconnectedtoPWMsignalfromoneofPWMgenerator.ThedeadtimesisloadedintothetimeronthedetectedPWMedgeevent.Dependingonwhethertheedgeisrisingorfalling,oneofthetransitionsonthecomplementaryoutputsisdelayeduntilthetimercountsdowntozero.AtimingdiagramindicatingthedeadtimeinsertionforthepairofPWMoutputsisshowninFigure8.Fig.8Dead-timeUnitBlockDiagramFig.9theWaveformsofPWMOutputsinComplementaryModeConclusionsInthispaper,wehavedesignedPWMmodulebasedonan8-bitMCUcompatiblewith8051family.Thedesigncangenerate2-channelprogrammableperiodicPWMsignalswithtwooperationmode,IndependentModeandComplementaryModeinwhichdead-timewillbeinserted.ThesimulationresultsontheEDAplatformhaveprovenitscorrectnessandusefulness.AcknowledgmentsTheauthorswouldliketothankShanghaiLeadingAcademicDisciplineProject(ProjectNumber:T0103)forthefinancialsupport.References1.Xianghui-fangandHuyue-li,Computermeasurementandcontrol,14(7)p.942(2006)2.Huyue-lia
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 心血管疾病基础知识课件
- 第一说课课件
- 心理技能全套课件下载
- 出境旅行搭车协议书范本
- 2025年计算机系统配套零、部件合作协议书
- 订购辣椒苗协议书范本
- 2025年圆柱型锌空气电池合作协议书
- 汽车托管风险协议书范本
- 竖版课件图片儿童
- 心理健康课情绪课件
- 财务共享公司建设方案
- 小学数学-二年级升三年级暑假数学作业-口算 +竖式计算
- 食品快检培训 课件
- 2025至2030内燃机市场发展趋势分析与未来投资战略咨询研究报告
- 汽车散热器安装施工方案与技术措施
- 2025年陕西延长石油招聘笔试备考题库(带答案详解)
- 山西省烟草专卖局(公司)笔试试题2024
- 2025年萍乡卫生职业学院单招(语文)测试题库附答案
- 江苏扬州经济技术开发区区属国有企业招聘笔试真题2024
- 出口退税培训课件下载
- 华为emt轮岗管理制度
评论
0/150
提交评论