English
Language : 

MEC1322 Datasheet, PDF (287/456 Pages) Microchip Technology – Keyboard and Embedded Controller for Notebook PC
MEC1322
FIGURE 25-2:
BLOCK DIAGRAM OF PWM CONTROLLER
CLOCK_HIGH
CLOCK_LOW
Clock Select
Clock
Pre-
Divider
(15:0)
PWM BLOCK
PWM Duty Cycle &
Frequency Control
Invert_PWM
EC I/F
PWM Registers
16-bit down
counter
PWM_ OUTPUT
Note: In Figure 25-2, the 48 MHz Ring Oscillator is represented as CLOCK_HIGH and 100kHz_Clk is repre-
sented as CLOCK_LOW.
The PWM clock source to the PWM Down Counter, used to generate a duty cycle and frequency on the PWM, is deter-
mined through the Clock select[1] and Clock Pre-Divider[6:3] bits in the PWMx Configuration Register register.
The PWMx Counter ON/OFF Time registers determine both the frequency and duty cycle of the signal generated on
PWM_OUTPUT as described below.
The PWM frequency is determined by the selected clock source and the total on and off time programmed in the PWMx
Counter ON Time Register and PWMx Counter OFF Time Register registers. The frequency is the time it takes (at that
clock rate) to count down to 0 from the total on and off time.
The PWM duty cycle is determined by the relative values programmed in the PWMx Counter ON Time Register and
PWMx Counter OFF Time Register registers.
The PWM Frequency Equation and PWM Duty Cycle Equation are shown below.
FIGURE 25-3:
PWM FREQUENCY EQUATION
PWM Frequency = (---P-----r--e---D-----i--v-1--i--s---o---r----+-----1----) × (---P----W-----M------C----o---u----n--(-t-C-e---rl--o-O---c--n-k--T-S---io--m-u---e-r--c-+---e--P-F---W-r--e---Mq----u-C--e--o-n---uc---ny---)-t--e---r--O-----f--f--T----i--m----e----)
In Figure 25-3, the ClockSourceFrequency variable is the frequency of the clock source selected by the Clock Select
bit in the PWMx Configuration Register, and PreDivisor is a field in the PWMx Configuration Register. The PWMCoun-
terOnTime, PWMCounterOffTime are registers that are defined in Section 25.11, "EC-Only Registers".
 2014 - 2015 Microchip Technology Inc.
DS00001719D-page 287