| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
PIC17C44 Datasheet(PDF) 75 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC17C44 Datasheet(HTML) 75 Page - Microchip Technology |
|
75 / 241 page ![]() © 1996 Microchip Technology Inc. DS30412C-page 75 PIC17C4X 12.1.3 USING PULSE WIDTH MODULATION (PWM) OUTPUTS WITH TMR1 AND TMR2 Two high speed pulse width modulation (PWM) outputs are provided. The PWM1 output uses Timer1 as its time-base, while PWM2 may be software configured to use either Timer1 or Timer2 as the time-base. The PWM outputs are on the RB2/PWM1 and RB3/PWM2 pins. Each PWM output has a maximum resolution of 10-bits. At 10-bit resolution, the PWM output frequency is 24.4 kHz (@ 25 MHz clock) and at 8-bit resolution the PWM output frequency is 97.7 kHz. The duty cycle of the output can vary from 0% to 100%. Figure 12-5 shows a simplified block diagram of the PWM module. The duty cycle register is double buff- ered for glitch free operation. Figure 12-6 shows how a glitch could occur if the duty cycle registers were not double buffered. The user needs to set the PWM1ON bit (TCON2<4>) to enable the PWM1 output. When the PWM1ON bit is set, the RB2/PWM1 pin is configured as PWM1 output and forced as an output irrespective of the data direc- tion bit (DDRB<2>). When the PWM1ON bit is clear, the pin behaves as a port pin and its direction is con- trolled by its data direction bit (DDRB<2>). Similarly, the PWM2ON (TCON2<5>) bit controls the configura- tion of the RB3/PWM2 pin. FIGURE 12-5: SIMPLIFIED PWM BLOCK DIAGRAM PWxDCH Duty Cycle registers PWxDCL<7:6> Clear Timer, PWMx pin and Latch D.C. (Slave) Comparator TMR2 Comparator PRy (Note 1) R S Q PWMxON RCy/PWMx Note 1: 8-bit timer is concatenated with 2-bit internal Q clock or 2 bits of the prescaler to create 10-bit time-base. Read Write FIGURE 12-6: PWM OUTPUT 0 1020 3040 0 PWM output Timer interrupt Write new PWM value Timer interrupt new PWM value transferred to slave Note The dotted line shows PWM output if duty cycle registers were not double buffered. If the new duty cycle is written after the timer has passed that value, then the PWM does not reset at all during the current cycle causing a “glitch”. In this example, PWM period = 50. Old duty cycle is 30. New duty cycle value is 10. |
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes 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 |