Renesas M16C/6NK Informações Técnicas Página 139

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 412
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 138
Rev.2.10 Apr 14, 2006 page 115 of 378
REJ09B0124-0210
M16C/6N Group (M16C/6NK, M16C/6NM) 13. Timers
13.1 Timer A
Figure 13.3 shows the Timer A Block Diagram. Figures 13.4 to 13.6 show the timer A-related registers.
The timer A supports the following four modes. Except in event counter mode, timers A0 to A4 all have the
same function. Use bits TMOD1 to TMOD0 in the TAiMR register (i = 0 to 4) to select the desired mode.
Timer mode: The timer counts an internal count source.
Event counter mode: The timer counts pulses from an external device or overflows and underflows
of other timers.
One-shot timer mode: The timer outputs a pulse only once before it reaches the minimum count
0000h.
Pulse width modulation mode: The timer outputs pulses in a given width successively.
TCK1 to TCK0, TMOD1 to TMOD0, MR2 to MR1: Bits in TAiMR register
TAiTGH to TAiTGL: Bits in ONSF register If i = 0, bits in TRGSR register if i = 1 to 4
TAiS: Bit in TABSR register
TAiUD: Bit in UDF register
i = 0 to 4
j = i - 1except j = 4 when i = 0
k = i + 1 except k = 0 when i = 4
NOTE:
1. Overflow or underflow
00
01
10
11
TCK1 to TCK0
Select clock source
TAiIN
Select clock
f1 or f2
f8
f32
fC32
Timer
: TMOD1 to TMOD0 = 00, MR2 = 0
One shot
: TMOD1 to TMOD0 = 10
Pulse width modulation : TMOD1 to TMOD0 = 11
Timer (gate function) : TMOD1 to TMOD0 = 00, MR2 = 1
Event counter : TMOD1 to TMOD0 = 01
TMOD1 to TMOD0,
MR2
00
01
10
11
TAiTGH to TAiTGL
TB2 overflow (1)
TAj overflow (1)
TAk overflow (1)
00
10
11
01
TMOD1 to TMOD0
Polarity
selector
To external trigger circuit
Pulse output
Decrement
0
1
MR2
TAiS
TAiUD
TAiOUT
High-order bits of data bus
Low-order bits of data bus
Reload register
Low-order
8 bits
High-order
8 bits
Counter
Increment/Decrement
Always counts down except
in event counter mode
Toggle Flip-Flop
TAi Addresses TAj TAk
Timer A0 0387h - 0386h Timer A4 Timer A1
Timer A1 0389h - 0388h Timer A0 Timer A2
Timer A2 038Bh- 038Ah Timer A1 Timer A3
Timer A3 038Dh- 038Ch Timer A2 Timer A4
Timer A4 038Fh- 038Eh Timer A3 Timer A0
Figure 13.3 Timer A Block Diagram
Vista de página 138
1 2 ... 134 135 136 137 138 139 140 141 142 143 144 ... 411 412

Comentários a estes Manuais

Sem comentários