253
•
When GR is an input capture register: The TCNT value is transferred to GR when an input
capture occurs and simultaneously the value previously stored in GR is transferred to BR.
•
Complementary PWM mode: When TCNT3 and TCNT4 change count directions, the BR
value is transferred to GR.
•
Reset-synchronized PWM mode: The BR value is transferred to GR upon a GRA3 compare
match.
10.4.2
Basic Functions
Counter Operation: When a start bit (STR0–STR4) in the timer start register (TSTR) is set to 1,
the corresponding timer counter (TCNT) starts counting. There are two counting modes: a free-
running mode and a periodic mode.
•
Procedure for selecting counting mode (figure 10.14):
1. Set bits TPSC2–TPSC0 in TCR to select the counter clock source. If an external clock
source is selected, set bits CKEG1 and CKEG0 in TCR to select the desired edge of the
external clock signal.
2. To operate as a periodic counter, set CCLR1 and CCLR0 in TCR to select whether to clear
TCNT at GRA compare match or GRB compare match.
3. Set GRA or GRB selected in step 2 as an output compare register using the timer I/O
control register (TIOR).
4. Write the desired cycle value in GRA or GRB selected in step 1.
5. Set the STR bit in TSTR to 1 to start counting.
Summary of Contents for HD6417032
Page 21: ......
Page 35: ...xiv ...
Page 85: ...50 ...
Page 101: ...66 ...
Page 129: ...94 ...
Page 135: ...100 ...
Page 343: ...308 ...
Page 369: ...334 ...
Page 383: ...348 ...
Page 475: ...440 ...
Page 525: ...490 CK RAS CAS TRp TRc TRcc tRASD1 tRASD2 tCASD3 tCASD2 TRr tCSR Figure 20 18 Self Refresh ...
Page 578: ...543 CK RAS CAS TRp TRc TRcc tRASD1 tRASD2 tCASD3 tCASD2 TRr tCSR Figure 20 62 Self Refresh ...
Page 689: ...654 ...