Timers (Timer A)
118
Mitsubishi microcomputers
M16C / 62P Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
development
Preliminary Specifications Rev.1.0
Specifications in this manual are tentative and subject to change.
Item
Specification
Count source
Count operation
f
1
, f
2
, f
8
, f
32
, f
C32
Down-count
When the counter reaches 0000
16
, it stops counting after reloading a new value
If a trigger occurs when counting, the timer reloads a new count and restarts counting
1/n n : set value of TAi register 0000
16
to FFFF
16
However, the counter does not work if the divide-by-n value is set to 0000
16
.
TAiS bit of TABSR register = “1” (start counting) and one of the following
triggers occurs.
External trigger input from the TAi
IN
pin
Timer B2 overflow or underflow,
timer Aj (j=i-1, except j=4 if i=0) overflow or underflow,
timer Ak (k=i+1, except k=0 if i=4) overflow or underflow
The TAiOS bit of ONSF register is set to “1” (= timer starts)
When the counter is reloaded after reaching “0000
16
”
TAiS bit is set to “0” (= stop counting)
Interrupt request generation timing
When the counter reaches “0000
16
”
TAi
IN
pin function
I/O port or trigger input
TAi
OUT
pin function
I/O port or pulse output
Read from timer
An indeterminate value is read by reading TAi register
Write to timer
When not counting and until the 1st count source is input after counting start
Value written to TAi register is written to both reload register and counter
When counting (after 1st count source input)
Value written to TAi register is written to only reload register
(Transferred to counter when reloaded next)
Select function
Pulse output function
The timer outputs a low when not counting and a high when counting.
Divide ratio
Count start condition
Count stop condition
Table 1.14.4. Specifications in One-shot Timer Mode
3. One-shot Timer Mode
In one-shot timer mode, the timer is activated only once by one trigger. (See Table 1.14.4.) When the
trigger occurs, the timer starts up and continues operating for a given period. Figure 1.14.12 shows the
TAiMR register in one-shot timer mode.