版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、Design of PWM Controller in a MCS-51外文由處: Compatible MCU附件2:外文原文(復(fù)印件)Design of PWM Controller in a MCS-51 Compatible MCUIntroductionPWM technology is a kind of voltage regulation method by controlling the switch frequency of DC power with fixed voltage to modify the two-end voltage of load. This tec
2、hnology can be used for a variety of applications including motor control, temperature control and pressure control and so on. In the motor control system shown as Fig. 1, through adjusting the duty cycle of power switch, the speed of motor can be controlled. As shown in Fig. 2, under the control of
3、 PWM signal, the average of voltage that controls the speed of motor changes with Duty-cycle ( D = t1/T in this Figure ), thus the motor speed can be increased when motor power turn on, decreased when power turn off.Fig.1: The Relationship between voltage of Armature and Fig.2 Architecture ofPWM Mod
4、uleTherefore, the motor speed can be controlled with regularly adjusting the time of turn-on and turn-off. There are three methods could achieve the adjustment of duty cycle:(1) Adjust frequency with fixed pulse-width. (2) Adjust both frequency and pulse-width.(3) Adjust pulse-width with fixed frequ
5、ency.Generally, there are four methods to generate the PWM signals as the following: (1) Generated by the device composed of separatelogic components. This method is the original method which now has been discarded. (2) Generated by software. This method need CPU to continuously operate instructions
6、 to control I/O pins for generating PWM output signals, so that CPU can not do anything other. Therefore, the method also has been discarded gradually. (3) Generated by ASIC. The ASIC makes a decrease of CPU burden and steady work generally has several functions such as over-current protection, dead
7、-time adjustment and so on. Then the method has been widely used in many kinds of occasion now. (4) Generated by PWM function module of MCU. Through embedding PWM function module in MCU and initializing the function, PWM pins of MCU can also automatically generate PWM out signals without CPU control
8、ling only when need to change duty-cycle. It is the method that will be implemented in this paper.In this paper, we propose a PWM module embedded in a 8051 microcontroller. The PWM module can support PWM pulse signals by initializing the control register and duty-cycle register with three methods ju
9、st mentioned above to adjust the duty cycle and several operation modes to add flexibility for user.The following section explains the architecture of the PWM module and the architectures of basic functional blocks. Section3 describes two operation modes. Experimental and simulation results verifyin
10、g proper system operation are also shown in that section. Depending on mode of operation, the PWM module creates one or more pulse-width modulated signals, whose duty ratios can be independently adjusted.Implementation of PWM module in MCUOverview of the PWM moduleA block diagram of PWM module is sh
11、own in Fig.3. It is clearly from the diagram that the whole module is composed of two sections: PWM signal generator and dead-time generator with channel select logic. The PWM function can be started by the user through implementing some instructions for initializing the PWM module. In particular, t
12、he following power and motion control applications are supported: ? DC Motor? Uninterruptablel Power Supply (UPS)The PWM module also has the following features:T Two PWM signal outputs with complementary or independent operationH Hardware deadtime generators for complementary modeD Duty cycle update
13、s are configurable to be immediated or synchronized to the PWMNot? : etailsofFWMlGwwfltorn UiQwn far clarity.Fig.3 Architecture of PWM ModuleDetails of the architecturePMW generatorThe architecture of the 2-output PWM generator shown in Fig.4 is based on a 16-bit resolution counter which creates a p
14、ulse-width modulated signal. The system is synthesized by a system clock signal whose frequency can be divided by 4 times or 12 times through setting the value of T3M for PWM0 or T4M for PWM1 in the special register PWMCON as shown in Fig.4. To PWM0 generator, the clock to 16-bit counter will be pre
15、-divided by 4 times by default when T3M is set to zero. And the clock will be divided by 12 times when T3M is set to 1. This is also true for PWM1. The other bits in PWMCON are explained in detail in Table 1.TF4TR4TF3TR3PSE1(,PWMT4MT3MFig .4 Bit Mapping of PWMCONTable 1: The Bit Definition in PWMCON
16、Hir4Km PM MUTR4JUN bii R* PWMOTF3liilerrLipl Request fcTr PWM 1RUN Lil LotPS匚Lchannel Seleui in Lonipiemenliiiy MWtMzk* SelectK4M< lock Prescaler An lJVMITIMCk>ck Priculcr ibrChannel-select logicThe follow Fig. 5 shows the channel-select logic which is useful in Complementary Mode. From this d
17、iagram, it is clear to know that signal CP and CPWM control the source of PWMH and PWML. And the details about the two control signals will be discussed in the section 3, and the architecture of dead-time generator will also be discussed in section 5 for the continuity of Complementary Mode.PWMOPWM1
18、Fig. 5 Diagram of Channel-select LogicOperation Mode and Simulation ResultsThe design has two operation modes: Independent Mode and Complimentary Mode. By setting the corresponding bit CPWM in register PWMCON shown in Fig.6 user can select one of the two operation modes. When CPWM is set to zero, PW
19、M module will work in Independent Mode, whereas, PWM module will work in Complimentary Mode. In the following of this section, the two operation mode will be explained respectively in detail and the simulation results of the PWM module from the Synoposys VCS EDAplatform which verify the design will
20、also be shown.Independent PWM Output ModeAn Independent PWM Output mode is useful for driving loads such as the one shown in Figure 6. A particular PWM output is in the Independent Output mode when the corresponding CP bit in the PWMCON register is set to zero.In this case, two-channel PWM outputs a
21、re independent of each other. The signal on pin PWM0/PWMH is from PWM0 generator, and the signal on pin PWM1/PWML is from PWM0 generator. The separate case is achieved by the channel-select logic shown in Fig. 6. The PWM I/O pins are set to independent mode by default upon advice reset. The dead-tim
22、e generator is disabled in the Independent mode. The simulation result is shown in Figure 6 as the following Fig.6 Tr4 and tr3 are run bits to PWM0 and PWM1, respectively. Actually, from this diagram, Pin P15/ P14 of MCU is used for PWMH/ PWML or normal I/O ,alternatively.Fig6 the Waveform of PWM Ou
23、tputs in Independent ModeComplementary PWM Output ModeThe Complementary Output mode is used to drive inverter loads similar to the one shown in Figure 7. This inverter topology is typical for DC applications. In Complementary Output Mode, the pair of PWM outputs cannot be active simultaneously. The
24、PWM channel and output pin pair are internally configured through channel-select logic as shown in Figure7. A dead-time may be optionally inserted during device switching where both outputs are inactive for a short period.The Complementary mode is selected for PWM I/O pin pair by setting the appropr
25、iate CPWM bit in PWMCON. In this case, PSEL is in effect. PWMH and PWML will come from PWM0 generator when PSEL is set to zero, when the signals from PWM1 generator is useless, whereas PWMH and PWML will come from PWM1 generator when PSEL is set to 1, when the signals from PWM0 generator is useless.
26、 In the process of producing the PWM outputs in Complementary Mode, the dead-time will be inserted to be discussed in the following section.Dead-time ControlDead-time generation is automatically enabled when PWM I/O pin pair is operating in the Complementary Output mode. Becausethe power output devi
27、ces cannot switch instantaneously, some amount of time must be provided between the turn-off event of one PWM output in a complementary pair and the turn-on event of the other transistor. The 2-output PWM module has one programmable dead-time with 8-bit register.The complementary output pair for the
28、 PWM module has an 8-bit down counter that is used to produce the dead-time insertion. As shown in Figure 8, the dead time unit has a rising and falling edge detector connected to PWM signal from one of PWM generator. The dead times is loaded into the timer on the detected PWM edge event. Depending
29、on whether the edge is rising or falling, one of the transitions on the complementary outputsis delayed until the timer counts down to zero. A timing diagram indicating the dead time insertion for the pair of PWM outputs is shown in Figure 8a.PWM HPWMLPWMGerieraEar InputFig 8a Dead-time Unit Block D
30、iagramN on-zero dd-tinriQDead-timeinsertedFig. 8b the Waveforms of PWM Outputs in Complementary ModeConclusionsIn this paper, we have designed PWM module based on an 8-bit MCU compatible with 8051 family. The design can generate 2-channel programmable periodic PWM signals with two operation mode, In
31、dependent Mode and Complementary Mode in which dead-time will be inserted. The simulation results on the EDA platform have proven its correctness and usefulness.附件1:外文資料翻譯譯文基于C51兼容微處理器單片機的 PW瞳制器設(shè)計導(dǎo)言圖2電壓的電樞和占空比之間的關(guān)系PW批術(shù),是一種電壓調(diào)節(jié)方法,通過控制具有固定電壓的直流電源的開關(guān)頻 率來調(diào)整兩端負荷電壓。這種技術(shù)能用于各種應(yīng)用包括電機、溫度、和壓力的控制, 等等。在電機系統(tǒng)中的應(yīng)用,
32、如圖1所示,通過調(diào)整電源開關(guān)的占空比,來控制電 機的速度,如圖2所示,平均電壓通過改變占空比來控制電機的速度 (在圖中D=t1/T 這樣當電機的電源打開時,它的速度加快,相反,當電源關(guān)閉時,速度下降。圖1 PWM空制框圖所以,通過定期地調(diào)整時間的開通和關(guān)斷來控制電機的轉(zhuǎn)速:這兒有三種方法 可以完成占空比的調(diào)整(1)通過脈寬來調(diào)整頻率;(2)通過同時調(diào)整頻率和脈寬; (3)通過頻率來調(diào)整脈寬。一般情況下,有四中方法可以產(chǎn)生 PWM信號,正如以下:(1)由獨立邏輯元 件組成的裝置產(chǎn)生,這種是原始的方法,現(xiàn)在已被淘汰;(2)通過軟件產(chǎn)生,這種方法需要CPU持續(xù)操作代碼來控制I/O 口,以致于CPU不
33、能做其他任何事。所 以,這種方法也漸漸被淘汰;(3)通過ASIC產(chǎn)生,ASIC減少了 CPU的負擔(dān),并 獲得了穩(wěn)定的工作,一般有幾個功能,如電流保護、死區(qū)時間調(diào)整等等;然而這種 方法現(xiàn)在已被廣泛用于許多場合;(4)通過單片機的PWM功能模塊產(chǎn)生,只有當 需要改變占空比的時候 CPU失控,這樣就不能產(chǎn)生PWM信號,否則通過在單片機 里嵌入PWM功能模塊,并使這功能初始化,單片機的PWM 口也能自動產(chǎn)生PWM 信號。這種方法將在文章中講述。在本文中,我們建議在8051單片機里嵌入一個PWMK塊。該PWMK塊,通過 初始化控制寄存器和寄存器的占空比,可以支持 PW脈沖信號,用剛才提到的上述 三種方法
34、調(diào)整占空比和幾個操作模式,以增加用戶彈性。以下這部分解釋PWMI塊和基本功能模塊的結(jié)構(gòu)。第三部分描述兩種操作模式。這部分還講述了實驗和仿真的結(jié)果驗證了合適的系統(tǒng)操作。通過操作模式,PWM真塊產(chǎn)生一個或更多的脈寬模塊信號,它們的比率可以自主調(diào)整。在單片機上執(zhí)行PWM1塊PWMK塊的概述PWM1塊如圖3所示,從圖中,可以很清楚得看到整個模塊有兩部分組成:PWM信號產(chǎn)生器和帶有頻道選擇邏輯的死區(qū)時間產(chǎn)生器。用戶可以通過執(zhí)行一些代碼使 PWM1塊初始化,從而啟動其功能。在特殊情況下,支持以下電源和運動控制應(yīng)用:1 .直流電機2 .持續(xù)電源供應(yīng)PWM1塊也有以下特征:1 .兩個PW崎出信號以互補或獨立的
35、方式運行2 .帶有互補模式的硬件死區(qū)電動機3 .占空比更新設(shè)置應(yīng)立刻或與 PWM0步Not? : U日口唇 al PVUM1 GefieratDr nuts,hawn forclarit/.圖3 PWM模塊的結(jié)構(gòu)結(jié)構(gòu)的詳細組成PWMfe動機二輸出PWW動機的2構(gòu)如圖2.1所示,該結(jié)構(gòu)是基于能產(chǎn)生脈寬調(diào)制信號上的16位計數(shù)器。該系統(tǒng)由四分頻或十二分頻的系統(tǒng)時鐘信號合成,時鐘信號的頻率可通過對在特殊寄存器 PWMCON的PWM電機的T3M或PWM電機的T4M的值進 行設(shè)置而調(diào)整,如圖4所示:對于PWM電機,當T3M設(shè)置為零時,16位計數(shù)器時 鐘將被默認預(yù)分為四分頻,當 T3M設(shè)置為1時,始終將被十
36、二分頻;PWM樣有這 種功能。在PWMCON勺其它位的定義,詳見表1TF4TR4TF3TR3PSELCPWMT4MT3M圖4 PWMCON位的位置表1: PWMCON位的定義BITTF4Inlin ujn Request Rw PU MilTR4RTN hit 砧r PWMOIT3Inutrupl X叫止* PVt M 1TRSRUN bit 陌r PWMIPSELChomih?l Seltci in CEp 此nicm 口 iyCPWMMtnld SelectI4Mfk Prescaler lkWMIT3MClock Prusculcr tkir FMM)通道選擇邏輯通道選擇邏輯在互補模式中很有用,如圖 5所示。從表中可以清楚得看出,信 號的CP和CPWM!制PWM和PWML來源,這兩個控制信號的詳細情況將在第三部 分講述,死區(qū)時間電機的結(jié)構(gòu)也將在一下部分的連續(xù)性互補模式中講述。PWMOPWMI圖5通道選擇邏輯表運行模式和仿真結(jié)果這種設(shè)計有兩種運行模式:獨立模式和互補模式。通過在PWMCON存器中設(shè)置相應(yīng)的位
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度國際勞務(wù)派遣勞動合同匯編3篇
- 胡克定律課程設(shè)計
- 職校數(shù)控技術(shù)課程設(shè)計
- 二零二五年國際貿(mào)易函電范文及服務(wù)條款合同6篇
- 2025版航空客運服務(wù)人員聘用合同協(xié)議3篇
- 2025版國際房地產(chǎn)投資開發(fā)合同書范本3篇
- 二零二五年度個人委托代繳社保及企業(yè)年金補充管理合同3篇
- 植物的變化課程設(shè)計
- 2024年股權(quán)激勵合同業(yè)績指標設(shè)定及獎勵發(fā)放協(xié)議
- 2024煤礦安全生產(chǎn)信息化平臺建設(shè)與運營合同2篇
- JJG 393-2018便攜式X、γ輻射周圍劑量當量(率)儀和監(jiān)測儀
- 2023年6月新高考歷史浙江卷試題真題答案解析版
- 人教新起點(一起)五年級英語上冊全冊知識點
- 幼兒園小班教案《墊子多玩》
- 2024年等離子切割機市場需求分析報告
- 高速公路服務(wù)區(qū)業(yè)態(tài)創(chuàng)新策劃書
- 市紀委跟班學(xué)習(xí)工作總結(jié)
- 速賣通運營工作總結(jié)
- 【智慧農(nóng)業(yè)在農(nóng)業(yè)生產(chǎn)經(jīng)營的應(yīng)用研究5000字】
- 妊娠合并高脂血癥的護理查房
- 小學(xué)三年級混合運算練習(xí)題400道(加減乘除混合運算精校文本打印版)
評論
0/150
提交評論