Pulse Width Measurement Mode - Renesas R8C/18 Series Hardware Manual

16-bit single-chip mcu
Table of Contents

Advertisement

R8C/18 Group, R8C/19 Group
14.1.4

Pulse Width Measurement Mode

In pulse width measurement mode, the pulse width of an external signal input to the INT1/CNTR0 pin
is measured (refer to Table 14.5 Pulse Width Measurement Mode Specifications). Figure 14.7
shows the TXMR Register in Pulse Width Measurement Mode. Figure 14.8 shows an Operating
Example in Pulse Width Measurement Mode.
Table 14.5
Pulse Width Measurement Mode Specifications
Item
Count sources
Count operations
Count start condition
Count stop condition
Interrupt request
generation timing
INT10/CNTR00,
INT11/CNTR01
pin functions
CNTR0 pin function
Read from timer
Write to timer
Select functions
Rev.1.30
Apr 14, 2006
REJ09B0222-0130
f1, f2, f8, fRING
• Decrement
• Continuously counts the selected signal only when the measured pulse is "H"
level, or conversely only "L" level.
• When the timer underflows, the contents of the reload register are reloaded
and the count is continued.
1 (count starts) is written to the TXS bit in the TXMR register.
0 (count stops) is written to the TXS bit in the TXMR register.
• When timer X underflows [timer X interrupt].
• Rising or falling of the CNTR0 input (end of measurement period) [INT1
interrupt]
Measured pulse input (INT1 interrupt input)
Programmable I/O port
The count value can be read out by reading registers TX and PREX.
• When registers TX and PREX are written while the count is stopped, values
are written to both the reload register and counter.
• When registers TX and PREX are written during the count, the value is written
to each reload register of registers TX and PREX at the following count source
input, the data is transferred to the counter at the second count source input,
and the count re-starts at the third count source input.
• INT1/CNTR0 signal polarity switch function
The R0EDG bit can select "H" or "L" level period for the input pulse width
measurement.
• Measured pulse input pin select function
The CNTRSEL bit in the UCON register can select the CNTR00 or CNTR01
pin.
Page 110 of 233
Specification
14. Timers

Advertisement

Table of Contents
loading

This manual is also suitable for:

R8c/1 seriesR8c seriesR8c/19 series

Table of Contents