| Electronic Components Datasheet Search |
|
MEC1322 Datasheet(PDF) 331 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
MEC1322 Datasheet(HTML) 331 Page - Microchip Technology |
|
331 / 456 page ![]() 2014 - 2015 Microchip Technology Inc. DS00001719D-page 331 MEC1322 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-7, "LED Blink Configuration Examples" shows some example blinking configurations: 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. 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-9. TABLE 28-7: LED BLINK CONFIGURATION EXAMPLES Prescale Duty Cycle Blink Frequency Blink 000h 00h 128Hz full off 000h FFh 128Hz full on 001h 40h 64Hz 3.9ms on, 11.6ms off 003h 80h 32Hz 15.5ms on, 15.5ms off 07Fh 20h 1Hz 125ms on, 0.875s off 0BFh 16h 0.66Hz 125ms on, 1.375s off 0FFh 10h 0.5Hz 125ms on, 1.875s off 180h 0Bh 0.33Hz 125ms on, 2.875s off 1FFh 40h 0.25Hz 1s on, 3s off TABLE 28-8: BLINKING MODE CALCULATIONS Parameter Unit Equation Frequency Hz (32KHz_Clk frequency) /(PRESCALE + 1)/255 ‘H’ Width Seconds (1/PERIOD) x (DutyCycle/255) ‘L’ Width Seconds (1/PERIOD) x (255 - DutyCycle) TABLE 28-9: PWM CONFIGURATION EXAMPLES Prescale PWM Frequency 000h 187.5 KHz 001h 93.75 KHz 003h 46.875 KHz 006h 26.8 KHz 00Bh 15.625 KHz 07Fh 1.46 KHz 1FFh 366 Hz FFFh 46 Hz |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |