tmp88ch40mg TOSHIBA Semiconductor CORPORATION, tmp88ch40mg Datasheet - Page 59

no-image

tmp88ch40mg

Manufacturer Part Number
tmp88ch40mg
Description
8 Bit Microcontroller
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet
8.3 Function
8.3.1 Timer mode
Example 1 :Setting the timer mode with source clock fc/2
Example 2 :Auto-capture
and the timer register 1A (TC1DRA) value is detected, an INTTC1 interrupt is generated and the up-counter is
cleared. After being cleared, the up-counter restarts counting. Setting TC1CR<ACAP1> to “1” captures the up-
counter value into the timer register 1B (TC1DRB) with the auto-capture function. Use the auto-capture
function in the operative condition of TC1. A captured value may not be fixed if it's read after the execution of
the timer stop or auto-capture disable. Read the capture value in a capture enabled condition. Since the up-
counter value is captured into TC1DRB by the source clock of up-counter after setting TC1CR<ACAP1> to
"1". Therefore, to read the captured value, wait at least one cycle of the internal source clock before reading
TC1DRB for the first time.
In the timer mode, the up-counter counts up using the internal clock. When a match between the up-counter
(fc = 20 MHz, CGCR<DV1CK> = “0”)
Table 8-1
LDW
DI
SET
EI
LD
LD
LD
:
LD
TC1CK
00
01
10
Source Clock for TimerCounter 1 (Example: fc = 20 MHz)
Resolution
(TC1DRA), 2625H
(EIRD). 2
(TC1CR), 00000000B
(TC1CR), 00010000B
(TC1CR), 01010000B
:
WA, (TC1DRB)
102.4
[µs]
6.4
0.5
DV1CK = 0
Maximum Time
Setting [s]
26.214 m
6.7108
0.4194
Page 51
NORMAL, IDLE Mode
; Sets the timer register (1 s ÷ 2
; IMF= “0”
; Enables INTTC1
; IMF= “1”
; Selects the source clock and mode
; Starts TC1
; ACAP1 ← 1
; Wait at least one cycle of the internal source clock
; Reads the capture value
11
Resolution
[Hz] and generating an interrupt 1 second later
204.8
12.8
[µs]
0.8
DV1CK = 1
Maximum Time
Setting [s]
52.428 m
13.4216
0.8388
11
/fc = 2625H)
TMP88CH40MG

Related parts for tmp88ch40mg