English
Language : 

MEC1404 Datasheet, PDF (378/572 Pages) Microchip Technology – Keyboard and Embedded Controller Products for Notebook PC
MEC140X/1X
The following diagram illustrates how the clock inputs and registers are routed to the PWM Duty Cycle & Frequency
Control logic to generate the PWM output.
FIGURE 27-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
PWM_ OUTPUT
EC I/F
PWM Registers
16-bit down
counter
Note: In FIGURE 27-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 27-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 27-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 27.11, "EC-Only Registers".
DS00001956D-page 378
 2015 - 2016 Microchip Technology Inc.