
R8C/2C Group, R8C/2D Group
Rev.2.00
Dec 05, 2007
REJ09B0339-0200
i = 0 or 1, j = either A, B, C, or D
Table 14.40
Output Compare Function Specifications
Item
Specification
Count sources
f1, f2, f4, f8, f32, fOCO40M
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 (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 (channels 0 and 1 operate
independently).
Data can be written to the TRDi register.
When the SYNC bit in the TRDMR register is set to 1 (channels 0 and 1 operate
synchronously).
Data can be written to both the TRD0 and TRD1 registers by writing to the TRDi
register.
Select functions
Output-compare output pin selected
Either 1 pin or multiple pins among TRDIOAi, TRDIOBi, TRDIOCi, or TRDIODi.
Output level at the compare match selected
“L” output, “H” output, or output level inversed
Initial output level selected
Set the level at period from the count start to the compare match.
Timing to set the TRDi register to 0000h
Overflow or compare match in the TRDGRAi register
Output pin in registers TRDGRCi and TRDGRDi changed
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.