HD6417021 Hitachi Semiconductor, HD6417021 Datasheet - Page 260

no-image

HD6417021

Manufacturer Part Number
HD6417021
Description
SuperH RISC engine
Manufacturer
Hitachi Semiconductor
Datasheet
• Procedure for selecting counting mode (figure 10.14):
246 HITACHI
1. Set bits TPSC2–TPSC0 in the TCR to select the counter clock source. If an external clock
2. To operate as a periodic counter, set CCLR1 and CCLR0 in the TCR to select whether to
3. Set the GRA or GRB selected in step 2 as an output compare register using the timer I/O
4. Write the desired cycle value in the GRA or GRB selected in step 1.
5. Set the STR bit in the TSTR to 1 to start counting.
source is selected, set bits CKEG1 and CKEG0 in the TCR to select the desired edges of
the external clock signal.
clear the TCNT at GRA compare match or GRB compare match.
control register (TIOR).
Counting mode selection
Figure 10.14 Procedure for Selecting the Counting Mode
Select counter clock
compare register
Periodic counter
Periodic counter
Select counter
Start counting
Select output
clear source
Counting?
Set period
Yes
No
(1)
(2)
(3)
(4)
(5)
Free-running counter
Free-running counter
Start counting
(5)

Related parts for HD6417021