English
Language : 

ATMEGA644P-B_14 Datasheet, PDF (112/344 Pages) ATMEL Corporation – 8-bit Atmel Microcontroller with 16/32/64Kbytes In-system Programmable Flash
• Bit 4:3 – WGMn3:2: Waveform Generation Mode
See description of Section 16.11.1 “TCCRnA – Timer/Counter n Control Register A” on page 109.
• Bit 2:0 – CSn2:0: Clock Select
The three clock select bits select the clock source to be used by the Timer/Counter, see Figure 16-10 on page 107 and
Figure 16-11 on page 108.
Table 16-6. Clock Select Bit Description
CSn2
CSn1
CSn0 Description
0
0
0
No clock source (Timer/Counter stopped).
0
0
1
clkI/O/1 (no prescaling)
0
1
0
clkI/O/8 (from prescaler)
0
1
1
clkI/O/64 (from prescaler)
1
0
0
clkI/O/256 (from prescaler)
1
0
1
clkI/O/1024 (from prescaler)
1
1
0
External clock source on Tn pin. Clock on falling edge.
1
1
1
External clock source on Tn pin. Clock on rising edge.
If external pin modes are used for the Timer/Countern, transitions on the Tn pin will clock the counter even if the pin is
configured as an output. This feature allows software control of the counting.
16.11.3 TCCRnC – Timer/Counter n Control Register C
Bit
7
6
5
4
3
2
1
0
(0x82)
FOCnA FOCnB
–
–
–
–
–
–
TCCRnC
Read/Write
R/W
R/W
R
R
R
R
R
R
Initial Value
0
0
0
0
0
0
0
0
• Bit 7 – FOCnA: Force Output Compare for Channel A
• Bit 6 – FOCnB: Force Output Compare for Channel B
The FOCnA/FOCnB bits are only active when the WGMn3:0 bits specifies a non-PWM mode. However, for ensuring
compatibility with future devices, these bits must be set to zero when TCCRnA is written when operating in a PWM mode.
When writing a logical one to the FOCnA/FOCnB bit, an immediate compare match is forced on the waveform generation
unit. The OCnA/OCnB output is changed according to its COMnx1:0 bits setting. Note that the FOCnA/FOCnB bits are
implemented as strobes. Therefore it is the value present in the COMnx1:0 bits that determine the effect of the forced
compare.
A FOCnA/FOCnB strobe will not generate any interrupt nor will it clear the timer in clear timer on compare match (CTC)
mode using OCRnA as TOP.
The FOCnA/FOCnB bits are always read as zero.
112 ATmega164P-B/ATmega324P-B/ATmega644P-B [DATASHEET]
9255E–AVR–08/14