English
Language : 

M16C1N Datasheet, PDF (75/238 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/10 SERIES
M16C/1N Group
10. Interrupt
10.4 TCIN Interrupt
A TCIN interrupt is generated from edges of a TCIN input signal or after 256 divisions of fRING.
To use TCIN input signal, set the time measurement input source switching bit (bit 7 at address 009A16)
of timer C control register 0 to "0" (TCIN). The level of input to TCIN pin is sampled by one of three
sampling clocks, f1, f8 or f32, selected with the digital filter clock select bit (bits 0 and 1 at address
009B16). The input level is determined when the sampled input level matches three times. (However, if
the port P33 is read, the value will be the unfiltered value.) The edge polarity of an interrupt can be a rising
edge, a falling edge, or both edges using the time measurement edge trigger select bits (bits 3 and 4 at
address 009A16).
When triggered after 256 divisions of fRING, set the time measurement input source switching bit (bit 7 at
address 009A16) to "1" (fRING256).
Figure 10.13 shows the timer C control registers 0 and 1.
Timer C control register 0
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
TCC0
Address
009A16
When reset
0XX000002
Bit symbol
Bit name
Function
RW
TCC00 Time measurement control bit 0 : Time measurement disabled
1 : Time measurement enabled
RW
b2 b1
TCC01 Timer C clock select bit
0 0 : f1
RW
(Note 1) 0 1 : f8
TCC02
1 0 : f32
RW
1 1 : Inhibited
b4 b3
TCC03 Time measurement input edge 0 0 : Rising edge
RW
trigger bit
(Note 1) 0 1 : Falling edge
TCC04
1 0 : Both edges
1 1 : Inhibited
RW
Nothing is assigned.
When write, set "0". When read, their contents are "0".
TCC07 Time measurement input
0 : TCIN
source switching bit
1 : fRING256
RW
(Note 1 to 3)
Note 1: Change this bit when time measurement is disabled.
Note 2: Set the ring oscillation stop bit (CM14) to "0" before setting this bit to "1".
Note 3: Inhibit an interrupt when changing the time measurement input source switching bit. The TCIN interrupt may be
generated after changing the time measurement input source switching bit. An interrupt should be enabled after
the interrupt request bit is cleared.
Timer C control register 1
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
TCC1
Address
009B16
When reset
XXXXXX112
Bit symbol
Bit name
Function
RW
b1 b0
TCC10 Digital filter clock select bit
0 0 : Inhibited
RW
(Note 1) 0 1 : f1
TCC11
1 0 : f8
1 1 : f32
RW
Nothing is assigned.
When write, set "0". When read, their contents are "0".
Note 1: Input edge becomes active when the same value from TCIN pin is sampled three times in succession.
Figure 10.13 Timer C control registers 0 and 1
Rev.1.00 Oct 20, 2004 page 63 of 222
REJ09B0007-0100Z