12. Timer 0/1/2/3/4/5
A96G150 User's manual
114
12.2
Timer 1
A 16-bit timer 1 consists of multiplexer, timer 1 A data register high/low, timer 1 B data register high/low
and timer 1 control register high/low (T1ADRH, T1ADRL, T1BDRH, T1BDRL, T1CRH, T1CRL).
Timer 1 operates in one of the following modes:
16-bit timer/counter mode
16-bit capture mode
16-bit PPG output mode (one-shot mode)
16-bit PPG output mode (repeat mode)
The timer/counter 1 uses an internal clock or an external clock (EC1) as an input clock source. The
clock sources are introduced below, and one is selected by clock selection logic which is controlled by
clock selection bits (T1CK[2:0]).
TIMER 1 clock source: fx/1, 2, 4, 8, 64, 512, 2048 and EC1
In capture mode, the data is captured into input capture data register (T1BDRH/T1BDRL) by EINT2.
Timer 1 results in the comparison between counter and data register through T1O port in timer/counter
mode. In addition, Timer 1 outputs PWM waveform through PWM1Oport in the PPG mode.
Table 16. TIMER 1 Operating Modes
T1EN
P0FSRL[5:4]
T1MS[1:0]
T1CK[2:0]
Timer 1
1
10
00
XXX
16 Bit Timer/Counter Mode
1
00
01
XXX
16 Bit Capture Mode
1
10
10
XXX
16 Bit PPG Mode(one-shot mode)
1
10
11
XXX
16 Bit PPG Mode(repeat mode)
12.2.1
16-bit timer/counter mode
16-bit timer/counter mode is selected by control registers, and the 16-bit timer/counter has counter
registers and data registers as shown in Figure 34. The counter register is increased by internal or
external clock input. Timer 1 can use the input clock with one of 1, 2, 4, 8, 64, 512 and 2048 prescaler
division rates (T1CK[2:0]). When the value of T1CNTH, T1CNTL and the value of T1ADRH, T1ADRL
are identical to each other in Timer 1, a match signal is generated and the interrupt of Timer1 occurs.
The T1CNTH, T1CNTL value is automatically cleared by the match signal. It can be cleared by software
(T1CC) too.
The external clock (EC1) counts up the timer at the rising edge. If the EC1 is selected as a clock source
by T1CK[2:0], EC1 port should be set to the input port by P14IO bit.
Содержание A96G150
Страница 126: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 126 Figure 43 16 bit Timer Counter Mode Operation Example...
Страница 136: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 136 Figure 51 16 bit Timer Counter Mode Operation Example...
Страница 147: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 147 Figure 59 16 bit Timer Counter Mode Operation Example...
Страница 157: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 157 Figure 67 16 bit Timer Counter Mode Operation Example...
Страница 171: ...A96G150 User s manual 14 12 bit ADC 171 Figure 79 ADC Operation Flow Sequence...
Страница 333: ...A96G150 User s manual Revision history 333 Revision history Revision Date Notes 1 00 2022 06 22 First creation...