742
Chapter 35 Free-Run Timer
7.Q & A
7. Q & A
7.1 What are the types of the internal clock, and how do I select?
There are 4 types of internal clocks, and these are set by the clock selection bit (TCCS.ECLK) and the count
clock bit (TCCS.CLK [1:0]).
7.2 How do I select the external clock?
Set with clock selection bits (TCCS.ECLK), data direction bits, and (extra) port function bits.
7.3 How do I enable / disable the count operation of the free-run timer?
Set with count operation bits (TCCS.STOP).
Internal clock
Setting Count period
Clock selection
Bit (ECLK)
Count clock bit
(CLK [1:0])
F
CLKP
=
32MHz
F
CLKP
= 16MHz
To select F
CLKP
/4
Set to “0” Sets to “00” 125 ns 250 ns
To select F
CLKP
/16
Set to “0” Set to “01” 0.5 µs1µs
To select F
CLKP
/32
Set to “0” Set to “10” 1 µs2µs
To select F
CLKP
/64
Set to “0” Set to “11” 2 µs4µs
To use the external
clock input
Setting Pins
Count
Cycle
Free-run Timer 0-7 The clock
selection
bit (ECLK)
to “1”
The port function bit
(PFRxy.z)
to “1”
The extra port
function bit
(EPFRxy.z}
to “1”
CK0-
CK7
Over 2/F
CLKP
Operation Count operation bit (STOP)
To enable the free-run timer Set to “0”
To stop the free-run timer Set to “1”