【正文】
[4]口被用做 PWMH/PWML或是一般的 I/O 口。 圖 6 獨立模式下的 PWM 波形 互補 PWM 輸出模式 互補輸出模式可以用于驅(qū)動逆變器負載,如圖 7所示。這種逆變器拓撲 學(xué)是典型的直流裝置。在互補輸出模式, PWM 的兩個輸出不能同時用。 PWM 通道和輸出口都是通過通道選擇邏輯內(nèi)部配置的,如圖 7所示。死區(qū)時間是在兩端輸出的開關(guān)裝置沒有工作的短時期時可以選擇插入的。 圖 7 PWM 互補輸出的典型電路 PWM I/O 口通過在 PWMCON 中設(shè)置適當(dāng)?shù)?CPWM 位選擇互補模式,在這種情況下,PSWL 是有效果的。當(dāng) PSEL 設(shè)置為 0時, PWMH 和 PWML 將來自 PWM0 電機,這時來自PWM1 電機的信號是沒用的,而當(dāng) PSEL 設(shè)置為 1 時, PWMH 和 PWML 將來自 PWM1 電機,這時來自 PWM0 電機 的信號是沒用的。在互補模式時產(chǎn)生 PWM 輸出信號的過程中,死區(qū)時間將被插入在以下這部分講述。 死區(qū)時間控制 當(dāng) PWM I/O 口在互補輸出模式運行時,死區(qū)時間是自動啟用生成的,因為電源輸出裝置不能瞬間開關(guān),在互補對模式下,一個 PWM 輸出的關(guān)閉與其它晶體管打開之間要一定的時間, 2輸出的 PWM 模塊有一個帶有 8位寄存器的可編程死區(qū)時間。 PWM 模塊的互補輸出對已有一個用于產(chǎn)生死區(qū)時間插入的 8 位計數(shù)器。死區(qū)時間單元有一個上升沿和下降沿探測器,而這個探測器與 PWM 電機產(chǎn)生的 PWM 信號連接。當(dāng)?shù)竭_ PWM 邊沿時,死區(qū)時 間被載入計時器,根據(jù)是否是上升沿或下降沿,在互補輸出端口上的其中一個過度被延遲,直到計數(shù)器降為 0。 PWM 輸出對的死區(qū)時間表,如圖 8a 所示: 圖 8a 死區(qū)時間單元模塊圖 圖 8b 互補模式的 PWM 輸出波形 總 結(jié): 本文,我們設(shè)計了基于 8 位兼容 8051 單片機的 PWM 模塊,這種設(shè)計能產(chǎn)生 2通道帶有兩種運行模式的可編程周期 PWM 信號,即可插入死區(qū)時間的獨立模式和互補模式。這種在 EDA 平臺的仿真結(jié)果已證明了它的和諧性和有用性。 附件 2:外文原文(復(fù)印件) Design of PWM Controller in a MCS51 Compatible MCU Introduction PWM technology is a kind of voltage regulation method by controlling the switch frequency of DC power with fixed voltage to modify the twoend voltage of load. This technology 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 PWM signal, the average of voltage that controls the speed of motor changes with Dutycycle ( D = t1/T in this Figure ), thus the motor speed can be increased when motor power turn on, decreased when power turn off. : The Relationship between Voltage of Armature and Architecture of PWM Module Therefore, the motor speed can be controlled with regularly adjusting the time of turnon and turnoff. There are three methods could achieve the adjustment of duty cycle: (1) Adjust frequency with fixed pulsewidth. (2) Adjust both frequency and pulsewidth. (3) Adjust pulsewidth with fixed frequency. Generally, there are four methods to generate the PWM signals as the following: (1) Generated by the device posed of separate logic ponents. This method is the original method which now has been discarded. (2) Generated by software. This method need CPU to continuously