Page 87
TMP86PM29BUG
9.3
Function
The TimerCounter 3 and 4 have the 8-bit timer, 8-bit event counter, 8-bit programmable divider output (PDO), 8-
bit pulse width modulation (PWM) output modes. The TimerCounter 3 and 4 (TC3, 4) are cascadable to form a 16-
bit timer. The 16-bit timer has the operating modes such as the 16-bit timer, 16-bit event counter, warm-up counter,
16-bit pulse width modulation (PWM) output and 16-bit programmable pulse generation (PPG) modes.
9.3.1
8-Bit Timer Mode (TC3 and 4)
In the timer mode, the up-counter counts up using the internal clock. When a match between the up-counter
and the timer register j (TTREGj) value is detected, an INTTCj interrupt is generated and the up-counter is
cleared. After being cleared, the up-counter restarts counting.
Note 1: In the timer mode, fix TCjCR<TFFj> to 0. If not fixed, the
PDOj
,
PWMj
and
PPGj
pins may output pulses.
Note 2: In the timer mode, do not change the TTREGj setting while the timer is running. Since TTREGj is not in the
shift register configuration in the timer mode, the new value programmed in TTREGj is in effect immediately
after the programming. Therefore, if TTREGi is changed while the timer is running, an expected operation
may not be obtained.
Note 3: j = 3, 4
Table 9-4 Source Clock for TimerCounter 3, 4 (Internal Clock)
Source Clock
Resolution
Maximum Time Setting
NORMAL1/2, IDLE1/2 mode
SLOW1/2,
SLEEP1/2
mode
fc = 16 MHz
fs = 32.768 kHz
fc = 16 MHz
fs = 32.768 kHz
DV7CK = 0
DV7CK = 1
fc/2
11
[Hz]
fs/2
3
[Hz]
fs/2
3
[Hz]
128
µ
s
244.14
µ
s
32.6 ms
62.3 ms
fc/2
7
fc/2
7
–
8
µ
s
–
2.0 ms
–
fc/2
5
fc/2
5
–
2
µ
s
–
510
µ
s
–
fc/2
3
fc/2
3
–
500 ns
–
127.5
µ
s
–
Example :Setting the timer mode with source clock fc/2
7
Hz and generating an interrupt 80
µ
s later
(TimerCounter4, fc = 16.0 MHz)
LD
(TTREG4), 0AH
: Sets the timer register (80
µ
s
÷
2
7
/fc = 0AH).
DI
SET
(EIRH). 3
: Enables INTTC4 interrupt.
EI
LD
(TC4CR), 00010000B
: Sets the operating clock to fc/2
7
, and 8-bit timer mode.
LD
(TC4CR), 00011000B
: Starts TC4.
Содержание TLCS-870/C Series
Страница 1: ...8 Bit Microcontroller TLCS 870 C Series TMP86PM29BUG ...
Страница 6: ...TMP86PM29BUG ...
Страница 7: ...Revision History Date Revision 2007 10 11 1 First Release 2008 8 29 2 Contents Revised ...
Страница 9: ......
Страница 15: ...vi ...
Страница 19: ...Page 4 1 3 Block Diagram TMP86PM29BUG 1 3 Block Diagram Figure 1 2 Block Diagram ...
Страница 23: ...Page 8 1 4 Pin Names and Functions TMP86PM29BUG ...
Страница 48: ...Page 33 TMP86PM29BUG ...
Страница 49: ...Page 34 2 Operational Description 2 3 Reset Circuit TMP86PM29BUG ...
Страница 61: ...Page 46 3 Interrupt Control Circuit 3 8 External Interrupts TMP86PM29BUG ...
Страница 81: ...Page 66 6 Watchdog Timer WDT 6 3 Address Trap TMP86PM29BUG ...
Страница 135: ...Page 120 10 8 Bit TimerCounter TC5 TC6 10 1 Configuration TMP86PM29BUG ...
Страница 145: ...Page 130 11 Asynchronous Serial interface UART 11 9 Status Flag TMP86PM29BUG ...
Страница 165: ...Page 150 13 10 bit AD Converter ADC 13 6 Precautions about AD Converter TMP86PM29BUG ...
Страница 183: ...Page 168 15 LCD Driver 15 4 Control Method of LCD Driver TMP86PM29BUG ...
Страница 201: ...Page 186 18 Electrical Characteristics 18 9 Handling Precaution TMP86PM29BUG ...
Страница 203: ...Page 188 19 Package Dimensions TMP86PM29BUG ...
Страница 205: ......