English
Language : 

UPD78F0411GA-GAM-AX Datasheet, PDF (210/564 Pages) Renesas Technology Corp – Old Company Name in Catalogs and Other Documents
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
Setting
<1> Each mode of TM00 and TM52 is set.
(a) Set TM00 as an interval timer. Select TM52 output as the count clock.
- TMC00: Set to operation prohibited.
(TMC00 = 00000000B)
- CRC00: Set to operation as a compare register.
(CRC00 = 000000x0B, x = don’t care)
- TOC00: Setting TO00 pin output is prohibited upon a match between CR000 and TM00
(TOC00 = 00000000B)
- PRM00: TM52 output selected as a count clock.
(PRM00 = 00000111B)
- CR000: Set the compare value to FFFFH.
If the compare value is set to M, TM00 will only count up to M.
- CR010: Normally, CR010 is not used, however, a compare match interrupt (INTTM010) is generated
upon a match between the CR010 setting value and TM00 value. Therefore, mask the
interrupt request by using the interrupt mask flag (TMMK010).
(b) Set TM52 as an external event counter.
- TCL52:
Edge selection of TI52 pin input
Falling edge of TI52 pin → TCL52 = 00H
Rising edge of TI52 pin → TCL52 = 01H
- CR52: Set the compare register value to FFH.
- TMC52: Count operation is stopped.
(TMC52 = 00000000B)
- TMIF52: Clear this register.
Caution When operating 16-bit timer/event counter 00 as an external 24-bit event counter, INTTM52
must be masked (TMMK52 = 1). Also, the compare register 52 (CR52) value must be set to
FFH.
(c) Set TMH2 to the input enable width adjust mode (PWM mode) for the TI52 pin.Note
- TMHMD2: Count operation is stopped, the count clock is selected, the mode is set to input enable width
adjust mode (PWM mode), the timer output level default value is set to high level, and timer
output is set to enable (TMHMD2 = 0xxx1011B, x = set based on usage conditions).
- CMP02: Compare value (N) frequency setting
- CMP12: Compare value (M) duty setting
Remark 00H ≤ CMP12 (M) < CMP02 (N) ≤ FFH
- ISC2: Set to ISC2 = 1 (TI52 pin input enable controlled)
Note This setting is not required if input enable for the TI52 pin is not controlled.
<2> TM00, TM52, and TMH2 count operation is started. Timer operation must be started in accordance with the
following procedure.
(a) Start TM00 counter operation by setting the TMC003 and TMC002 bits to 1 and 1.
(b) Start TM52 counter operation by setting TCE52 to 1.
(c) Start TMH2 counter operation by setting TMHE2 to 1.Note
Note This setting is not required if input enable for the TI52 pin is not controlled.
208
User’s Manual U18698EJ1V0UD