EasyManuals Logo

Renesas M16C/29 Series User Manual

Renesas M16C/29 Series
501 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 #132 background imageLoading...
Page #132 background image
12. Timer A
puorG92/C61M
page 106
854fo7002,03.raM21.1.veR
2110-1010B90JER
Item Specification
Count source f1, f2, f8, f32, fC32
Count operation • Decrement
•
When the timer underflows, it reloads the reload register contents and continues counting
Divide ratio 1/(n+1) n: set value of TAi register (i= 0 to 4) 000016 to FFFF16
Count start condition Set TAiS bit in the TABSR register to 1 (start counting)
Count stop condition Set TAiS bit to 0 (stop counting)
Interrupt request generation timing
Timer underflow
TAiIN pin function I/O port or gate input
TAiOUT pin function I/O port or pulse output
Read from timer Count value can be 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 • Gate function
Counting can be started and stopped by an input signal to TAiIN pin
• Pulse output function
Whenever the timer underflows, the output polarity of TAiOUT pin is inverted.
When not counting, the pin outputs a low.
12.1.1 Timer Mode
In timer mode, the timer counts a count source generated internally (see Table 12.1). Figure 12.7 shows
TAiMR register in timer mode.
Table 12.1 Specifications in Timer Mode
Figure 12.7 Timer Ai Mode Register in Timer Mode
NOTE:
1. The port direction bit for the TAi
IN pin must be set to 0 ( input mode).
Timer Ai Mode Register (i=0 to 4)
Symbol Address After Reset
TA0MR to TA4MR 0396
16 to 039A16 0016
Bit Name FunctionBit Symbol RW
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
(TA
iOUT pin is a pulse output pin)
Gate function select bit
0 0:
Gate function not available
0 1: (TAi
IN pin functions as I/O port)
1 0: Counts while input on the TAi
IN pin
is low
(1)
1 1: Counts while input on the TAi IN pin
is high
(1)
b4 b3
MR2
MR1
MR3
Set to 0 in timer mode
0 0: f
1 or f2
0 1: f8
1 0: f
32
1 1: f
C32
b7 b6
TCK1
TCK0
Count source select bi
t
000
RW
RW
RW
RW
RW
RW
RW
RW
}

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Renesas M16C/29 Series Specifications

General IconGeneral
BrandRenesas
ModelM16C/29 Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals