CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
Preliminary User’s Manual U19014EJ1V0UD
172
6.5 Special Use of TM00
6.5.1 Rewriting CR010 during TM00 operation
In principle, rewriting CR000 and CR010 of the
µ
PD78F0730 when they are used as compare registers is
prohibited while TM00 is operating (TMC003 and TMC002 = other than 00).
However, the value of CR010 can be changed, even while TM00 is operating, using the following procedure if
CR010 is used for PPG output and the duty factor is changed (change the value of CR010 immediately after its value
matches the value of TM00. If the value of CR010 is changed immediately before its value matches TM00, an
unexpected operation may be performed).
Procedure for changing value of CR010
<1> Disable interrupt INTTM010 (TMMK010 = 1).
<2> Disable reversal of the timer output when the value of TM00 matches that of CR010 (TOC004 = 0).
<3> Change the value of CR010.
<4> Wait for one cycle of the count clock of TM00.
<5> Enable reversal of the timer output when the value of TM00 matches that of CR010 (TOC004 = 1).
<6> Clear the interrupt flag of INTTM010 (TMIF010 = 0) to 0.
<7> Enable interrupt INTTM010 (TMMK010 = 0).
Remark
For TMIF010 and TMMK010, see
CHAPTER 13 INTERRUPT FUNCTIONS
.
6.5.2 Setting LVS00 and LVR00
(1) Usage of LVS00 and LVR00
LVS00 and LVR00 are used to set the default value of the TO00 pin output and to invert the timer output without
enabling the timer operation (TMC003 and TMC002 = 00). Clear LVS00 and LVR00 to 00 (default value: low-
level output) when software control is unnecessary.
LVS00
LVR00
Timer Output Status
0
0
Not changed (low-level output)
0
1
Cleared (low-level output)
1
0
Set (high-level output)
1 1
Setting
prohibited
electronic components distributor