English
Language : 

M16C6S_09 Datasheet, PDF (194/208 Pages) Renesas Technology Corp – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
M16C/6S Group
Usage Notes
Timer A (One-shot Timer Mode)
The timer remains idle after reset. Set the mode, count source, counter value, etc. using the TAiMR (i = 0
to 4) register, the TAi register, bits TA0TGL and TA0TGH in the ONSF register and the TRGSR register
before setting the TAiS bit in the TABSR register to 1 (count starts).
Always make sure bits TA0TGL and TA0TGH in the TAiMR register, the ONSF register, and the TRGSR
register are modified while the TAiS bit remains 0 (count stops) regardless whether after reset or not.
When setting TAiS bit to 0 (count stop), the followings occur:
• A counter stops counting and a content of reload register is reloaded.
• TAiOUT pin outputs “L”.
• After one cycle of the CPU clock, the IR bit in TAiIC register is set to 1 (interrupt request).
Output in one-shot timer mode synchronizes with a count source internally generated. When the external
trigger has been selected, a maximun delay of one cycle of the count source occurs between the trigger
input to TAiIN pin and output in one-shot timer mode.
The IR bit is set to 1 when timer operation mode is set with any of the following procedures:
• Select one-shot timer mode after reset.
• Change an operation mode from timer mode to one-shot timer mode.
• Change an operation mode from event counter mode to one-shot timer mode.
To use the timer Ai interrupt (the IR bit), set the IR bit to 0 after the changes listed above have been made.
When a trigger occurs while the timer is counting, the counter reloads the reload register value, and
continues counting after a second trigger is generated and the counter is decremented once. To generate
a trigger while counting, space more than one cycle of the timer count source from the first trigger and
generate again.
When selecting the external trigger for the count start conditions in timer A one-shot timer mode, do
generate an external trigger 300ns before the count value of timer A is set to 000016. The one-shot
timer does not continue counting and may stop.
Rev.5.01 Dec 10, 2009 page 194 of 201
REJ03B0014-0501