329
Chapter 10
Timer
Preliminary User’s Manual U15839EE1V0UM00
(2)
Compare operation (free run)
Basic settings (m = 1 to 4):
(a) Example: Interval timer (free run)
Setting method interval timer:
(1)
An usable compare register is one of GCCn1 to GCCn4, and the corresponding counter (TMGn0
or TMGn1) must be selected with the TBGm bit.
(2)
Select a count clock cycle with the CSE12 to CSE10 bits (TMGn1 register) or CSE02 to CSE00
bits (TMGn0 register).
(3)
Write data to GCCnm.
(4)
Start timer operation by setting POWER and TMG0E (or TMG1E).
Compare Operation:
(1)
When the value of the counter matches the value of GCCnm (m = 0 to 4), a match interrupt
(INTCCGnm) is output.
(2)
When the counter overflows, an overflow interrupt (INTTMGn0/INTTMGn1) is generated.
Figure 10-44:
Timing of compare mode (free run)
Data N is set in GCCn1, and the counter TMGn0 is selected.
Bit
Value
Remark
CCSG0
0
free run mode
CCSG5
0
SWFGm
0
disable TOGnm
CCSGm
1
Compare mode
for GCCnm
TBGm
X
assign counter
for GCCnm
0: TMGn0
1: TMGn1
N
ENFG0
TMGn0
GCCn1
INTCCGn1
INTTMGn0
FFFFH
FFFFH
FFFFH
Match
Summary of Contents for mPD703128
Page 6: ...6 Preliminary User s Manual U15839EE1V0UM00 ...
Page 20: ...20 Preliminary User s Manual U15839EE1V0UM00 ...
Page 32: ...32 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 154: ...154 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 238: ...238 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 356: ...356 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 522: ...522 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 600: ...600 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 610: ...610 Preliminary User s Manual U15839EE1V0UM00 ...
Page 612: ......