Timer X - Renesas M16C FAMILY Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C FAMILY:
Table of Contents

Advertisement

Under development
Preliminary specification
Specifications in this manual are tentative and subject to change.
R8C/11 Group

12.1 Timer X

The Timer X is an 8-bit timer with an 8-bit prescaler. Figure 12.1 shows the block diagram of Timer X.
Figures 12.2 and 12.3 show the Timer X-related registers.
The Timer X has five operation modes listed as follows:
• Timer mode:
• Pulse output mode:
• Event counter mode:
• Pulse width measurement mode: The timer measures an external pulse's pulse width.
• Pulse period measurement mode:The timer measures an external pulse's period.
TXCK1 to TXCK0
=00
2
f
1
=01
2
f
8
=10
2
f
32
=11
2
f
2
Polarity
INT
/CNTR
1
0
switching
TXMOD1 to TXMOD0 bits=01
TXOCNT bit
CNTR
0
Figure 12.1 Timer X Block Diagram
Timer X mode register
b7 b6 b5 b4 b3 b2 b1 b0
Notes:
1. The IR bit in the INT1IC register may be set to "1" (interrupt requested) when the R0EDG bit is rewritten.
Refer to the paragraph 19.2.5 "Changing Interrupt Source" in the Usage Notes Reference Book.
Figure 12.2 TXMR Register
Rev.0.91
2003 Sep 08
The timer counts an internal count source (clock source).
The timer counts an internal count source and outputs the pulses
whose polarity is inverted at the timer the timer underflows.
The timer counts external pulses.
TXMOD1 to TXMOD0
=00
or 01
2
2
=11
2
=10
2
TXS bit
R0EDG =1
2
R0EDG=0
Symbol
TXMR
Bit symbol
Bit name
TXMOD0
Operation mode
select bit 0, 1
TXMOD1
INT1/CNTR0
R0EDG
polarity switching
1
bit
Timer X count
TXS
start flag
P3
/CNTR
0
TXOCNT
select bit
Operation mode
TXMOD2
select bit 2
Active edge
TXEDG
reception flag
Timer X under
TXUND
flow flag
page 71 of 184
Peripheral data bus
Reload register
Counter
PREX register
Q
Toggle flip-flop
CK
Q
CLR
Address
After reset
008B
00
16
16
Function
b1 b0
0 0 : Timer mode or
pulse period measurement mode
0 1 : Pulse output mode
1 0 : Event counter mode
1 1 : Pulse width measurement mode
Function varies with each operation mode
0 : Stops counting
1 : Starts counting
Function varies with each operation mode
0
0 : Except in pulse period measurement mode
1 : Pulse period measurement mode
Function varies with each operation mode.
Function varies with each operation mode.
12.1 Timer (Timer X)
Reload register
Counter
TX register
Write to TX register
TXMOD1 to TXMOD0 bits=01
2
RW
RW
RW
RW
RW
RW
RW
RW
RW
Timer X interrupt
INT1 interrupt

Advertisement

Table of Contents
loading

This manual is also suitable for:

R8c seriesTiny series

Table of Contents