English
Language : 

M16C6K9 Datasheet, PDF (88/292 Pages) Renesas Technology Corp – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
M16C/6K9 Group
Timer A
(3) One-shot timer mode
In this mode, the timer operates only once. (See Table.FB-4) When a trigger occurs, the timer starts to
operate for a given period. Fig.FB-10 shows the timer Ai mode register in one-shot timer mode.
Table.FB-4 Timer specifications in one-shot timer mode
Item
Specification
Count source
f1, f8, f32, fC32
Count operation
• The timer counts down
• When the count reaches 000016, the timer stops counting after reloading a new count
• If a trigger occurs when counting, the timer reloads a new count and restarts counting
Divide ratio
1/n n : Set value
Count start condition
• An external trigger is input
• The timer overflows
• The one-shot start flag is set (= 1)
Count stop condition
• A new count is reloaded after the count has reached 000016
• The count start flag is reset (= 0)
Interrupt request generation timing The count reaches 000016
TAiIN pin function
Programmable I/O port or trigger input
TAiOUT pin function
Programmable I/O port or pulse output
Read from timer
When timer Ai register is read, it indicates an indeterminate value
Write to timer
• When counting stopped
When a value is written to timer Ai register, it is written to both reload
register and counter
• When counting in progress
When a value is written to timer Ai register, it is written to only reload register
(Transferred to counter at next reload time)
Timer Ai mode register
b7 b6 b5 b4 b3 b2 b1 b0
0
10
Symbol
Address
When reset
TAiMR(i = 0 to 4) 039616 to 039A16 0016
Bit symbol
TMOD0
TMOD1
MR0
Bit name
Operation mode
selection bits
Pulse output function
selection bit
Function
b1 b0
1 0 : One-shot timer mode
0 : Pulse is not output
(TAiOUT pin is a normal port pin)
1 : Pulse is output (Note 1)
(TAiOUT pin is a pulse output pin)
RW
MR1
MR2
External trigger selection 0 : Falling edge of TAiIN pin's input signal (Note 3)
bit (Note 2)
1 : Rising edge of TAiIN pin's input signal (Note 3)
Trigger selection bit
0 : One-shot start flag is valid
1 : Selected by event/trigger selection register
MR3
TCK0
TCK1
0 (Must always be “0” in one-shot timer mode)
b7 b6
Count source selection bits
0 0 : f1
0 1 : f8
1 0 : f32
1 1 : fC32
Note 1: The settings of the corresponding port register and port direction register are invalid.
Note 2: Valid only when the TAiIN pin is selected by the event/trigger selection bit
(addresses 038216 and 038316). If timer overflow is selected, this bit can be “1” or “0”.
Note 3: Set the corresponding port direction register to “0”.
Fig.FB-10 Timer Ai mode register in one-shot timer mode
Rev.1.00 Jun 06, 2003 page 88 of 290