參數(shù)資料
型號(hào): R5F3651ENFC
元件分類: 微控制器/微處理器
英文描述: MICROCONTROLLER, PQFP128
封裝: 20 X 14 MM, 0.50 MM PITCH, LQFP-128
文件頁數(shù): 75/81頁
文件大?。?/td> 879K
代理商: R5F3651ENFC
93
4317K–AVR–03/2013
AT90PWM2/3/2B/3B
Figure 14-5. CTC Mode, Timing Diagram
An interrupt can be generated each time the counter value reaches the TOP value by using the
OCF0A Flag. If the interrupt is enabled, the interrupt handler routine can be used for updating
the TOP value. However, changing TOP to a value close to BOTTOM when the counter is run-
ning with none or a low prescaler value must be done with care since the CTC mode does not
have the double buffering feature. If the new value written to OCR0A is lower than the current
value of TCNT0, the counter will miss the compare match. The counter will then have to count to
its maximum value (0xFF) and wrap around starting at 0x00 before the compare match can
occur.
For generating a waveform output in CTC mode, the OC0A output can be set to toggle its logical
level on each compare match by setting the Compare Output mode bits to toggle mode
(COM0A1:0 = 1). The OC0A value will not be visible on the port pin unless the data direction for
the pin is set to output. The waveform generated will have a maximum frequency of f
OC0 =
f
clk_I/O/2 when OCR0A is set to zero (0x00). The waveform frequency is defined by the following
equation:
The N variable represents the prescale factor (1, 8, 64, 256, or 1024).
As for the Normal mode of operation, the TOV0 Flag is set in the same timer clock cycle that the
counter counts from MAX to 0x00.
14.6.3
Fast PWM Mode
The fast Pulse Width Modulation or fast PWM mode (WGM02:0 = 3 or 7) provides a high fre-
quency PWM waveform generation option. The fast PWM differs from the other PWM option by
its single-slope operation. The counter counts from BOTTOM to TOP then restarts from BOT-
TOM. TOP is defined as 0xFF when WGM2:0 = 3, and OCR0A when WGM2:0 = 7. In non-
inverting Compare Output mode, the Output Compare (OC0x) is cleared on the compare match
between TCNT0 and OCR0x, and set at BOTTOM. In inverting Compare Output mode, the out-
put is set on compare match and cleared at BOTTOM. Due to the single-slope operation, the
operating frequency of the fast PWM mode can be twice as high as the phase correct PWM
mode that use dual-slope operation. This high frequency makes the fast PWM mode well suited
for power regulation, rectification, and DAC applications. High frequency allows physically small
sized external components (coils, capacitors), and therefore reduces total system cost.
In fast PWM mode, the counter is incremented until the counter value matches the TOP value.
The counter is then cleared at the following timer clock cycle. The timing diagram for the fast
PWM mode is shown in Figure 14-6. The TCNT0 value is in the timing diagram shown as a his-
togram for illustrating the single-slope operation. The diagram includes non-inverted and
TCNTn
OCn
(Toggle)
OCnx Interrupt Flag Set
1
4
Period
2
3
(COMnx1:0 = 1)
f
OCnx
fclk_I/O
2 N
1
OCRnx
+
--------------------------------------------------
=
相關(guān)PDF資料
PDF描述
R5F3651KDFC MICROCONTROLLER, PQFP128
R5F21217KFP 8-BIT, FLASH, 20 MHz, MICROCONTROLLER, PQFP48
R5F21275SNFP 16-BIT, FLASH, 20 MHz, MICROCONTROLLER, PQFP32
R5F2L388ADFA 8-BIT, FLASH, 20 MHz, MICROCONTROLLER, PQFP80
R5F21154DSP 16-BIT, FLASH, 20 MHz, MICROCONTROLLER, PDSO20
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
R5F3651KCDFC 制造商:RENESAS 制造商全稱:Renesas Technology Corp 功能描述:televisions, household appliances, office equipment, communication devices
R5F3651KCDFC#V0 制造商:Renesas Electronics Corporation 功能描述:M16C/65C 400+8/31 128LQFP 14X20 -40 TO +85 - Trays 制造商:Renesas Electronics Corporation 功能描述:IC MCU 16BIT 384KB FLASH 128LQFP
R5F3651KCNFC 制造商:RENESAS 制造商全稱:Renesas Technology Corp 功能描述:televisions, household appliances, office equipment, communication devices
R5F3651KCNFC#V0 制造商:Renesas Electronics Corporation 功能描述:M16C/65C 400+8/31 128LQFP 14X2 制造商:Renesas Electronics Corporation 功能描述:M16C/65C 400+8/31 128LQFP 14X20 -20 TO +85 - Trays 制造商:Renesas Electronics Corporation 功能描述:IC MCU 16BIT 384KB FLASH 128LQFP
R5F3651KDFC 制造商:RENESAS 制造商全稱:Renesas Technology Corp 功能描述:RENESAS MCU