Programmable One-Shot Generation Mode - Renesas R8C/18 Series Hardware Manual

16-bit single-chip mcu
Table of Contents

Advertisement

R8C/18 Group, R8C/19 Group
14.2.3

Programmable One-shot Generation Mode

In programmable one-shot generation mode, one-shot pulse is output from the TZOUT pin by a
program or an external trigger input (input to the INT0 pin) (refer to Table 14.9 Programmable One-
Shot Generation Mode Specifications). When a trigger is generated, the timer starts operating from
the point only once for a given period equal to the set value in the TZPR register. The TZSC register
is not used in this mode. Figure 14.19 shows Registers TZMR and PUM in Programmable One-Shot
Generation Mode. Figure 14.20 shows an Operating Example in Programmable One-Shot
Generation Mode.
Table 14.9
Programmable One-Shot Generation Mode Specifications
Item
Count sources
Count operations
One-shot pulse
output time
Count start conditions • Set the TZOS bit in the TZOC register to 1 (one-shot starts).
Count stop conditions • When reloading completes after the count value is set to 00h.
Interrupt request
generation timing
TZOUT pin function
INT0 pin function
Read from timer
Write to timer
Select functions
NOTES:
1. Set the TZS bit in the TZMR register to 1 (count starts).
2. Set the TZS bit to 1 (count starts), the INT0EN bit in the INTEN register to 1 (enables INT0 input),
and the INOSTG bit in the PUM register to 1 (INT0 one-shot trigger enabled). A trigger which is input
during the count cannot be acknowledged, however an INT0 interrupt request is generated.
3. The set value is reflected at the following one-shot pulse after writing to the TZPR register.
Rev.1.30
Apr 14, 2006
REJ09B0222-0130
f1, f2, f8, Timer X underflow
• Decrement the value set in the TZPR register
• When the timer underflows, it reloads the contents of the reload register before
the count completes and the TZOS bit is set to 0 (one-shot stops).
• When the count stops, the timer reloads the contents of the reload register
before it stops.
(n+1)(m+1)/fi
fi: Count source frequency, n: value set in PREZ register, m: value set in TZPR
register
• Input active trigger to the INT0 pin
• When the TZS bit in the TZMR register is set to 0 (count stops).
• When the TZOS bit in the TZOC register is set to 0 (one-shot stops).
In half a cycle of the count source, after the timer underflows (at the same time as
the TZOUT output ends) [timer Z interrupt].
Pulse output
(To use this pin as a programmable I/O port, select timer mode.)
• When the INOSTG bit in the PUM register is set to 0 (INT0 one-shot trigger
disabled): programmable I/O port or INT0 interrupt input
• When the INOSTG bit in the PUM register is set to 1 (INT0 one-shot trigger
enabled): external trigger (INT0 interrupt input)
The count value can be read out by reading registers TZPR and PREZ.
The value written to registers TZPR and PREZ is written to the reload register
(3)
only
.
• Output level latch select function
The TZOPL bit can select the output level of the one-shot pulse waveform.
• INT0 pin one-shot trigger control and polarity select functions
The INOSTG bit can select the trigger as active or inactive from the INT0 pin.
Also, the INOSEG bit can select the active trigger polarity.
Page 127 of 233
Specification
(2)
14. Timers
(1)

Advertisement

Table of Contents
loading

This manual is also suitable for:

R8c/1 seriesR8c seriesR8c/19 series

Table of Contents