CHAPTER 9 8-BIT TIMERS 30 AND 40
User’s Manual U14826EJ5V0UD
90
(2) 8-bit timer mode control register 40 (TMC40)
TMC40 is the register that controls the setting of the timer 40 count clock and the setting of the operating
mode.
This register is set with a 1-bit or 8-bit memory manipulation instruction.
RESET input clears this register to 00H.
Figure 9-5. Format of 8-Bit Timer Mode Control Register 40
Symbol
<7>
6 5 4 3 2 1
<0>
Address
After
reset
R/W
TMC40 TCE40
0
TCL402 TCL401 TCL400
TMD401
TMD400
TOE40 FF56H 00H
R/W
TCE40
TM40 count operation control
Note 1
0
Clears TM40 count value and halt operation (in cascade connection mode, the TM30 count value is
simultaneously cleared as well.)
1
Starts count operation (in cascade connection mode, the TM30 count operation is simultaneously started as
well.)
Selection of timer 40 count clock
TCL402 TCL401 TCL400
When operating at f
X
= 5.0 MHz
When operating at f
CC
= 1.0 MHz
0 0 0
f
X
(5.0 MHz)
f
CC
(1.0 MHz)
0 0 1
f
X
/2
2
(1.25 MHz)
f
CC
/2
2
(250 kHz)
0 1 0
f
TMI
0 1 1
f
TMI
/2
1 0 0
f
TMI
/2
2
1 0 1
f
TMI
/2
3
TMD301
TMD300
TMD401
TMD400
Selection
of timer 30, timer 40 operating mode
Note 2
0 0 0 0
Discrete
mode
0
1
0
1
Cascade connection mode
0
0
1
1
Carrier generator mode
0
0
1
0
PWM output mode
Other than above
Setting prohibited
TOE40
Timer output control
0
Output
disabled
1
Output enabled (port mode)
Notes 1.
In cascade connection mode, since count operations are controlled by TCE40, TCE30 (bit 7 of
TMC30) is ignored even if it is set.
2.
The selection of operating mode is made by combining the two registers TMC30 and TMC40.
Caution Be sure to clear bit 6 to 0.
Remarks 1.
f
X
: System clock oscillation frequency (ceramic/crystal oscillation)
2.
f
CC
: System clock oscillation frequency (RC oscillation)
3.
f
TMI
: External clock input from TMI/P21 pin