English
Language : 

M306H7MG-XXXFP Datasheet, PDF (77/329 Pages) Renesas Technology Corp – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER with DATA ACQUISITION CONTROLLER
M306H7MG-XXXFP/MC-XXXFP/FGFP
9. TIMERS
9.1.1 Timer Mode
In timer mode, the timer counts a count source generated internally (see Table 9.1). Figure 9.7 shows TAiMR
register in timer mode.
Table 9.1 Specifications in Timer Mode
Item
Count source
Count operation
Specification
f1, f2, f8, f32, fC32
• Down-count
• When the timer underflows, it reloads the reload register contents and continues counting
Divide ratio
Count start condition
1/(n+1) n: set value of TAi register (i= 0 to 4) 000016 to FFFF16
Set TAiS bit of 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
TAiOUT pin function
Read from timer
Write to timer
I/O port or gate input
I/O port or pulse output
Count value can be read by reading TAi register
• 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.
Timer Ai mode register (i=0 to 4)
b7 b6 b5 b4 b3 b2 b1 b0
0
00
Symbol
TA0MR to TA4MR
Address
039616 to 039A16
After reset
0016
Bit symbol
TMOD0
TMOD1
MR0
Bit name
Operation mode
select bit
Pulse output function
select bit
MR1
Gate function select bit
MR2
Function
RW
b1 b0
RW
0 0 : Timer mode
RW
0 : Pulse is not output
(TAiOUT pin is a normal port pin)
1 : Pulse is output (Note 1)
RW
(TAiOUT pin is a pulse output pin)
b4 b3
00:
01:
Gate function not available
(TAiIN pin functions as I/O port)
RW
1 0 : Counts while input on the TAiIN pin
is low (Note 2)
1 1 : Counts while input on the TAiIN pin RW
is high (Note 2)
MR3
Must be set to “0” in timer mode
RW
TCK0
Count source select bit
b7 b6
0 0 : f1 or f2
RW
0 1 : f8
TCK1
1 0 : f32
RW
1 1 : fC32
Note 1: TA0OUT pin is N-channel open drain output.
Note 2: The port direction bit for the TAiIN pin must be set to “0” (= input mode).
Figure 9.7 Timer Ai Mode Register in Timer Mode
Rev.2.10 Oct 25, 2006 Page 77 of 326
REJ03B0152-0210