English
Language : 

M16C1N Datasheet, PDF (111/238 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/10 SERIES
M16C/1N Group
12. Timers
12.4.3 Programmable One-shot Generation Mode
In this mode, upon software command or external trigger input (input to the INT0 pin), the microcom-
puter outputs the one-shot pulse from the TZOUT pin. (See Table 12.12) When a trigger occurs, the
timer starts operating from the point only once for a given period equal to the set value of the Timer Z
primary. Timer Z secondary is unused in this mode.
Table 12.12 lists specifications of programmable one-shot generating mode. Figure 12.27 shows the
Timer Y, Z mode register and Timer Y, Z waveform output control register in this mode. Figure 12.28
shows the Timer Z operation example in this mode.
Table 12.12 Specifications of programmable one-shot generating mode
Item
Specification
Count source
f1, f8, Timer Y underflow, fC32
Count operation
• Down counts the set value of Timer Z primary
• When the timer underflows, it reloads the contents of reload register before stopping
counting.
• When a counting stops, the timer reloads the contents of the reload register before it
Divide ratio
stops.
1
(n+1) X (m+1)
n: Set value of Prescaler Z, m: Set value of Timer Z primary
Count start condition
• Timer Z one-shot start bit is set (=1) (Note 1)
• Valid trigger is input to INT0 pin (Note 2)
Count stop condition
• When reloading is completed after count value was set to "0016"
• When Count start flag is reset (=0)
• Timer Z one-shot start bit is reset (=0) (Note 3)
Interrupt request generation timing When count value becomes "0016"
TZOUT pin function
Pulse output
INT0 pin function
Programmable I/O port, external interrupt input pin, or external trigger input pin
Read from timer
Count value can be read out by reading Timer Z primary register.
Same applies to Prescaler Z register.
Write to timer
When a value is written to Timer Z primary register, it is written to only reload register.
Same applies to Prescaler Z register. (Note 4)
Select function
• Output level latch select function
The output level of one-shot pulse waveform is selectable.
• INT0 pin one-shot trigger control function and polarity select function
The trigger input from the INT0 pin can be set to valid or invalid. Also, the valid trigger's
polarity can be chosen to be the rising edge, falling edge, or rising and falling both
edges.
• Waveform extend function (Note 5)
The one-shot pulse waveform can be extended 0.5 cycles of the count source.
Frequency when waveform extended: 2xfi/(n+1)/(2x(m+1)+TZPUM0)
n: set value of Prescaler Z, m: set value of Timer Z primary
TZPUM0: Timer Z primary waveform extension control bit
Note 1: Count start flag must have been set to "1".
_______
_______
Note 2: Count start flag must have been set to "1", INT0 input enable bit [INT0EN] to "1", and INT0 pin one-shot trigger
control bit to "1".
Note 3: When the count is stopped by writing "0" to the count start flag or Timer Z one-shot start bit, the Timer Z interrupt
request bit becomes "1" and an interrupt may occur. Thus, interrupts must be disabled before the count is
stopped. Furthermore, set the Timer Z interrupt request bit to "0" before starting counting again.
Note 4: Each set value becomes effective by writing to the Timer Z primary register. And the set values are reflected
collectively beginning with the next one-shot pulse after writing to the Timer Z primary.
Note 5: When using the waveform extend function, the Prescaler Z register must be set to "0016".
When selecting Timer Y underflow and f1 for the count source, the waveform extend function cannot be used.
Rev.1.00 Oct 20, 2004 page 99 of 222
REJ09B0007-0100Z