English
Language : 

MEC1404 Datasheet, PDF (388/572 Pages) Microchip Technology – Keyboard and Embedded Controller Products for Notebook PC
MEC140X/1X
The Blinking and General Purpose PWM modes share the hardware used in the breathing mode. The Prescale value
is derived from the LD field of the LED_DELAY register and the Duty Cycle is derived from the MIN field of the LED_LIM-
ITS register.
TABLE 28-4: BLINKING MODE CALCULATIONS
Parameter
Frequency
‘H’ Width
‘L’ Width
Unit
Hz
Seconds
Seconds
Equation
(5Hz_Clk frequency) /(PRESCALE + 1)/255
(1/PERIOD) x (DutyCycle/255)
(1/PERIOD) x (255 - DutyCycle)
28.8.3 GENERAL PURPOSE PWM
When used in the Blinking configuration with the 48 MHz Ring Oscillator, the LED module can be used as a general-
purpose programmable Pulse-Width Modulator with an 8-bit programmable pulse width. It can be used for fan speed
control, sound volume, etc. With the 48 MHz Ring Oscillator source, the PWM frequency can be configured in the range
shown in TABLE 28-5:.
TABLE 28-5: PWM CONFIGURATION EXAMPLES
Prescale
000h
001h
003h
006h
00Bh
07Fh
1FFh
FFFh
PWM Frequency
187.5 KHz
93.75 KHz
46.875 KHz
26.8 KHz
15.625 KHz
1.46 KHz
366 Hz
46 Hz
TABLE 28-6: GENERAL PURPOSE PWM MODE CALCULATIONS
Parameter
Frequency
‘H’ Width
‘L’ Width
Unit
Hz
Seconds
Seconds
Equation
(48 MHz Ring Oscillator frequency) / (PRESCALE + 1) / 255
(1/PERIOD) x (DutyCycle/255)
(1/PERIOD) x (255 - DutyCycle)
28.8.3.1 PWM WDT
When the PWM is configured as a general-purpose PWM (in the Blinking configuration with the 48 MHz clock), the PWM
includes a Watch Dog Timer (WDT). The WDT consists of an internal 8-bit counter and an 8-bit reload value (the field
WDTLD in LED Configuration Register register). The internal counter is loaded with the reset value of WDTLD (14h, or
4 seconds) on system nSYSRST and loaded with the contents of WDTLD whenever either the LED Configuration Reg-
ister register is written or the MIN byte in the LED Limits Register register is written (the MIN byte controls the duty cycle
of the PWM).
DS00001956D-page 388
 2015 - 2016 Microchip Technology Inc.