English
Language : 

M16C80 Datasheet, PDF (108/358 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/80 SERIES
M16C/80 Group
13. Timer A
(1) Timer mode
In this mode, the timer counts an internally generated count source. (See Table 13.1) Figure 13.5 shows
the timer Ai mode register in timer mode.
Table 13.1 Specifications of timer mode
Item
Specification
Count source
f1, f8, f32, fc32
Count operation
• Down count
• When the timer underflows, it reloads the reload register contents before
continuing counting
Divide ratio
1/(n+1) n : Set value
Count start condition
Count start flag is set (= 1)
Count stop condition
Count start flag is reset (= 0)
Interrupt request generation timing When the timer underflows
TAiIN pin function
Programmable I/O port or gate input
TAiOUT pin function
Programmable I/O port or pulse output (Setting by the corresponding function
select registers A and B)
Read from timer
Count value can be read out by reading timer Ai register
Write to timer
• When not counting
Value written to timer Ai register is written to both reload register and counter
• When counting
Value written to timer Ai register is written to only reload register
(Transferred to counter at next reload time)
Select function
• Gate function
Counting can be started and stopped by the TAiIN pin’s input signal
• Pulse output function
Each time the timer underflows, the TAiOUT pin’s polarity is reversed
Timer Ai mode register
b7 b6 b5 b4 b3 b2 b1 b0
0
00
Symbol
TAiMR(i=0 to 4)
Address
When reset
035616 to 035A16 00000X002
Bit symbol
Bit name
Function
RW
TMOD0
TMOD1
Operation mode
select bit
b1 b0
0 0 : Timer mode
MR0
This bit is invalid in M16C/80 series.
Port output control is set by the function select registers A and B. – –
MR1
MR2
Gate function select bit
b4 b3
0 X (Note 1): Gate function not available
(TAiIN pin is a normal port pin)
1 0 : Timer counts only when TAiIN pin is
held “L” (Note 2)
1 1 : Timer counts only when TAiIN pin is
held “H” (Note 2)
MR3
TCK0
TCK1
0 (Set to “0” in timer mode)
Count source select bit
b7 b6
0 0 : f1
0 1 : f8
1 0 : f32
1 1 : fC32
Note 1: The bit can be “0” or “1”.
Note 2: Set the corresponding port function select register to I/O port, and port
direction register to “0”.
Figure 13.5 Timer Ai mode register in timer mode
Rev.1.00 Aug. 02, 2005 Page 97 of 329
REJ09B0187-0100