EasyManuals Logo
Home>Renesas>Computer Hardware>M16C Series

Renesas M16C Series User Manual

Renesas M16C Series
380 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #87 background imageLoading...
Page #87 background image
Timer A
M30240 Group
Rev.1.00 Sep 24, 2003 Page 69 of 360
1.2.21.1 Timer mode
In this mode, the timer counts an internally generated count source. See Table 1.18 below. Figure
1.63 shows the timer Ai mode register in timer mode.
Figure 1.63: Timer Ai mode register in timer mode
Table 1.18: Specifications of timer mode
Item Specification
Count source f1, f8, f32
Count operation
• Down count
• When the timer underflows, it loads 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
TAi
IN
pin function
Programmable I/O port or gate input
TAi
OUT
pin function
Programmable I/O port or pulse output
Read from timer Count value can be read out by reading timer Ai register
Write to timer
• When counting is stopped and a value is written to timer Ai register, it is written to both reload
register and counter
• When counting is in progress and a value is written to timer Ai register, it is written only to
reload register (to be transferred to counter at the next reload time)
Select function
• Gate function
Counting can be started and stopped by TAi
IN
pin’s input signal
• Pulse output function
Each time the timer underflows, the TAi
OUT
pin’s polarity is reversed
Note 1: The settings of the corresponding port register and port direction register
are invalid.
Note 2: The bit can be “0” or “1”.
Note 3: Set the corresponding port direction register to “0”.
Timer Ai mode register
Symbol
Address
When reset
TAiMR(i=0 to 4)
0396
16
to 039A
16
00
16
Bit name FunctionBit symbol WR
b7 b6 b5 b4 b3 b2 b1 b0
Operation mode
select bit
0 0 : Timer mode
b1 b0
TMOD1
TMOD0
MR0
Pulse output function
select bit
0 : Pulse is not output
(TA
iOUT
pin is a normal port pin)
1 : Pulse is output (Note 1)
(TA
iOUT
pin is a pulse output pin)
Gate function select bit
0 X
(Note 2)
: Gate function not available
(TAi
IN
pin is a normal port pin)
1 0 : Timer counts only when TA
iIN
pin is
held “L(Note 3)
1 1 : Timer counts only when TA
iIN
pin is
held “H” (Note 3)
b4 b3
MR2
MR1
MR3
0 (Must always be fixed to “0” in timer mode)
0 0 : f
1
0 1 : f
8
1 0 : f
32
1 1 : Reserved
b7 b6
TCK1
TCK0
Count source select bit
00
0

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas M16C Series and is the answer not in the manual?

Renesas M16C Series Specifications

General IconGeneral
BrandRenesas
ModelM16C Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals