
R8C/3JM Group
20. Timer RD
R01UH0285EJ0100 Rev.1.00
Aug 08, 2011
i = 0 or 1, j = A, B, C, or D
Table 20.7
Output Compare Function Specifications
Item
Specification
Count sources
f1, f2, f4, f8, f32, fC2, fOCO40M, fOCO-F
External signal input to the TRDCLK pin (valid edge selected by a program)
Count operations
Increment
Count period
When bits CCLR2 to CCLR0 in the TRDCRi register are set to 000b (free-running
operation).
1/fk × 65536 fk: Frequency of count source
Bits CCLR1 to CCLR0 in the TRDCRi register are set to 01b or 10b (set the TRDi
register to 0000h at the compare match in the TRDGRji register).
Frequency of count source x (n+1)
n: Setting value in the TRDGRji register
Waveform output timing
Compare match
Count start condition
1 (count starts) is written to the TSTARTi bit in the TRDSTR register.
Count stop conditions
0 (count stops) is written to the TSTARTi bit in the TRDSTR register when the
CSELi bit in the TRDSTR register is set to 1.
The output compare output pin holds output level before the count stops.
When the CSELi bit in the TRDSTR register is set to 0, the count stops at the
compare match in the TRDGRAi register.
The output compare output pin holds level after output change by the compare
match.
Interrupt request generation
timing
Compare match (The content of the TRDi register matches content of the TRDGRji
register.)
TRDi register overflows
TRDIOA0 pin function
Programmable I/O port, output-compare output, or TRDCLK (external clock) input
TRDIOB0, TRDIOC0,
TRDIOD0, TRDIOA1 to
TRDIOD1 pin functions
Programmable I/O port or output-compare output (Selectable by pin)
INT0 pin function
Programmable I/O port, pulse output forced cutoff signal input, or INT0 interrupt input
Read from timer
The count value can be read by reading the TRDi register.
Write to timer
When the SYNC bit in the TRDMR register is set to 0 (timer RD0 and timer RD1
operate independently).
Data can be written to the TRDi register.
When the SYNC bit in the TRDMR register is set to 1 (timer RD0 and timer RD1
operate synchronously).
Data can be written to both the TRD0 and TRD1 registers by writing to the TRDi
register.
Selectable functions
Output-compare output pin selection
Either 1 pin or multiple pins among TRDIOAi, TRDIOBi, TRDIOCi, or TRDIODi.
Output level at the compare match selection
“L” output, “H” output, or output level inverted
Initial output level selected
Set the level at period from the count start to the compare match.
Timing for setting the TRDi register to 0000h
Overflow or compare match in the TRDGRAi register
Changing output pins for registers TRDGRCi and TRDGRDi
The TRDGRCi register can be used as output control of the TRDIOAi pin and the
TRDGRDi register can be used as output control of the TRDIOBi pin.
Timer RD can be used as the internal timer without output.
A/D trigger generation