English
Language : 

MEC1404 Datasheet, PDF (387/572 Pages) Microchip Technology – Keyboard and Embedded Controller Products for Notebook PC
FIGURE 28-4:
Full on
EXAMPLE OF A SEGMENTED CURVE
MEC140X/1X
Full off
In this figure, the rise and fall curves are implemented in 4 linear segments and are the rise and fall periods are sym-
metric.
The breathing mode uses the 32.768 KHz clock for its time base.
28.8.2 BLINKING
When configured for blinking, a subset of the hardware used in breathing is used to implement the blinking function. The
PWM (an 8-bit accumulator plus an 8-bit duty cycle register) drives the LED directly. The Duty Cycle register is pro-
grammed directly by the user, and not modified further. The PWM accumulator is configured as a simple 8-bit up counter.
The counter uses the 32.768 KHz clock, and is pre-scaled by the Delay counter, to slow the PWM down from the 128Hz
provided by directly running the PWM on the 32.768 KHz clock.
With the pre-scaler, the blink rate of the LED could be as fast as 128Hz (which, because it is blinking faster than the eye
can distinguish, would appear as a continuous level) to 0.03125Hz (that is, with a period of 7.8ms to 32 seconds). Any
duty cycle from 0% (0h) to 100% (FFh) can be configured, with an 8-bit precision. An LED with a duty cycle value of 0h
will be fully off, while an LED with a duty cycle value of FFh will be fully on.
In Blinking mode the PWM counter is always in 8-bit mode.
Table 28-3, "LED Blink Configuration Examples" shows some example blinking configurations:
TABLE 28-3: LED BLINK CONFIGURATION EXAMPLES
Prescale
000h
000h
001h
003h
07Fh
0BFh
0FFh
180h
1FFh
Duty Cycle
00h
FFh
40h
80h
20h
16h
10h
0Bh
40h
Blink
Frequency
128Hz
128Hz
64Hz
32Hz
1Hz
0.66Hz
0.5Hz
0.33Hz
0.25Hz
Blink
full off
full on
3.9ms on, 11.6ms off
15.5ms on, 15.5ms off
125ms on, 0.875s off
125ms on, 1.375s off
125ms on, 1.875s off
125ms on, 2.875s off
1s on, 3s off
 2015 - 2016 Microchip Technology Inc.
DS00001956D-page 387