290
Chapter 10
Timer
Preliminary User’s Manual U15839EE1V0UM00
(a) When CCC00 register is set to 0000H
If the CCC00 register is set to 0000H, the 0000H after the TMC0 register counts up from FFFFH to
0000H is judged as a match. The 0000H when the TMC0 register begins counting is not judged as
a match.
(b) When match clearing is enabled
If match clearing is enabled (CLR bit = 1) for the CCC00 register, the TMC0 register is cleared
when a match with the TMC0 register occurs during a compare operation.
(c) Example: Interval timer
By setting the TMCC00 and TMCC01 registers as described below Timer C operates as an
interval timer that repeatedly generates interrupt requests with the value that was set in advance in
the CCC00 register as the interval.
Setting method:
(1)
set corresponding port pins (P5) to Timer C input (PM5 to input, PMC5 to Timer C0)
(2)
set CAE bit to "1" for activate the Timer C peripheral
(3)
set CLR- and CMS0 bit of TMCC01 register to "1"
(4)
set CE bit to enable the counter and start operation
Operation:
(1)
When the counter value of the TMC0 register matches the setting value of the CCC00 register, the
TMC0 register is cleared (0000H)
(2)
An interrupt request signal (INTCCC00) is generated at the same time that the count operation
resumes.
Figure 10-14:
Timing of interval timer operation
Remarks: 1. p:Setting value of CCC00 register (0000H to FFFFH)
2. t:Count clock cycle
3. Interval time = (p + 1)
×
t
Count start
0001H
0000H 0001H
0000H 0001H
0000H
Interval time
Interval time
Interval time
t
TMC0
CCC00
INTCCC00
interrupt
Clear
Clear
p
p
p
p
p
p
p
COUNT
f
Содержание mPD703128
Страница 6: ...6 Preliminary User s Manual U15839EE1V0UM00 ...
Страница 20: ...20 Preliminary User s Manual U15839EE1V0UM00 ...
Страница 32: ...32 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Страница 154: ...154 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Страница 238: ...238 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Страница 356: ...356 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Страница 522: ...522 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Страница 600: ...600 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Страница 610: ...610 Preliminary User s Manual U15839EE1V0UM00 ...
Страница 612: ......