Renesas R8C/Tiny Series Manuál Strana 96

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 199
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 95
R8C/10 Group
Rev.1.20 Jan 27, 2006 page 86 of 180
REJ09B0019-0120
12.4 Timer C
Timer C is a 16-bit free-running timer. Figure 12.28 shows a block diagram of Timer C. The Timer C uses
an edge input to TCIN pin or the fRING128 clock as trigger to latch the timer count value and generates an
interrupt request. The TCIN input has a digital filter and this prevents an error caused by noise or so on
from occurring. Table 12.13 shows Timer C specifications. Figure 12.29 shows TC, TM0, TCC0, and
TCC1 registers. Figure 12.30 shows an operation example of Timer C.
Item Specification
Count source f1, f8, f32
Count operation Count up
Transfer value in TC register to TM0 register at active edge of measurement pulse
Value in TC register is set to 000016 when a counting stops
Count start condition TCC00 bit in TCC0 register is set to 1 (capture enabled)
Count stop condition TCC00 bit in TCC0 register is set to 0 (capture disabled)
I
nterrupt request
_____
When active edge of measurement pulse is input [INT3 interrupt]
generation timing When Time C underflows [Timer C interrupt]
______
INT3/TCIN pin function Programmable I/O or measurement pulse input
Counter value reset timing When TCC00 bit in TCC0 register is set to 0 (capture disabled)
Read from timer
(1)
Counter value can be read out by reading TC register.
Counter value at measurement pulse active edge input can be read out by reading TM0
register.
Write to timer Write to TC register and TM0 register is disabled
Select function
_____
INT3/TCIN switching function
Measurement pulse active edge is selected by TCC03 to TCC04 bits
Digital filter function
Digital filter sampling frequency is selected by TCC11 to TCC10 bits
Trigger select function
TCIN input or fRING128 is selected by TCC07 bit.
NOTES:
1. TC register and TM0 register must be read in 16-bit units.
TM0 register
Upper 8 bits
Lower 8 bits
Counter
f
1
f
8
f
32
Edge detection
f
RING128
Timer C interrupt
TCC07=1
Transfer signal
Digital
filter
f
1
f
8
f
32
TCC11 to TCC10
=01
2
TC register
Data bus
Upper 8 bits
Lower 8 bits
INT3/TC
IN
=10
2
=11
2
TCC07=0
TCC02 to TCC01
=00
2
=01
2
=10
2
INT3 interrupt
TCC11 to TCC10
=00
2
Other than 00
2
TCC01, TCC02, TCC07: Bits in TCC0 register
TCC10, TCC11: Bits in TCC1 register
Sampling
clock
Table 12.13 Timer C Specifications
Figure 12.28 Timer C Block Diagram
12.4 Timer (Timer C)
Zobrazit stránku 95
1 2 ... 91 92 93 94 95 96 97 98 99 100 101 ... 198 199

Komentáře k této Příručce

Žádné komentáře