Timer Mode - Renesas R8C/18 Series Hardware Manual

16-bit single-chip mcu
Table of Contents

Advertisement

R8C/18 Group, R8C/19 Group
14.1.1

Timer Mode

Timer mode, the internally generated count source is counted (refer to Table 14.2 Timer Mode
Specifications). Figure 14.4 shows the TXMR Register in Timer Mode.
Table 14.2
Timer Mode Specifications
Item
Count sources
Count operations
Divided ratio
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
Timer X Mode Register
b7 b6 b5 b4
b3 b2
b1 b0
0 0 0 0 0
0
0
NOTES:
1.
The IR bit in the INT1IC register may be set to 1 (requests interrupt) w hen the R0EDG bit is rew ritten.
Refer to 12.5.5 Changing Interrupt Sources.
2.
This bit is used to select the polarity of INT1
3. Refer to 14.1.6 Notes on Tim er X for precautions regarding the TXS bit.
Figure 14.4
TXMR Register in Timer Mode
Rev.1.30
Apr 14, 2006
REJ09B0222-0130
f1, f2, f8, fRING
• Decrement
• When the timer underflows, the contents of the reload register are reloaded
and the count is continued.
1/(n+1)(m+1) n: value set in PREX register, m: value set in TX register
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].
Programmable I/O port, or 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.
Symbol
Address
008Bh
TXMR
Bit Symbol
Bit Name
Operating mode select bits 0, 1
TXMOD0
TXMOD1
_____
INT1
/CNTR0 signal
R0EDG
polarity sw itch bit
Timer X count start flag
TXS
TXOCNT
Set to 0 in timer mode.
TXMOD2
Operating mode select bit 2
TXEDG
Set to 0 in timer mode.
TXUND
Set to 0 in timer mode.
_____
interrupt in timer mode.
Page 106 of 233
Specification
b1 b0
0 0 : Timer mode or pulse period measurement
mode
0 : Rising edge
1 : Falling edge
(1, 2)
(3)
0 : Stops counting.
1 : Starts counting.
0 : Other than pulse period measurement mode
After Reset
00h
Function
14. Timers
RW
RW
RW
RW
RW
RW
RW
RW
RW

Advertisement

Table of Contents
loading

This manual is also suitable for:

R8c/1 seriesR8c seriesR8c/19 series

Table of Contents