Timers; Timers X, Y And Z; Timer X; Timer Z - 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

19.3 Timers

19.3.1 Timers X, Y and Z

(1) Timers X, Y and Z stop counting after reset. Therefore, a value must be set to these timers and
prescalers before starting counting.
(2) Even if the prescalers and timers are read out simultaneously in 16-bit units, these registers are
read byte-by-byte in the microcomputer. Consequently, the timer value may be updated during the
period these two registers are being read.

19.3.2 Timer X

(1) In pulse period measurement mode, the TXEDG bit and TXUND bit in the TXMR register can be
set to "0" by writing "0" to these bits in a program. However, these bits remain unchanged when "1"
is written. To set one flag to "0" in a program, write "1" to the other flag by using the MOV instruction.
(This prevents any unintended changes of flag.)
Example (when setting TXEDG bit to "0"):
MOV.B
(2) When changing to pulse period measurement mode from other mode, the contents of the TXEDG
bit and TXUND bit are indeterminate. Write "0" to the TXEDG bit and TXUND bit before starting
counting.

19.3.3 Timer Z

In programmable one-shot generation mode and programmable wait one-shot generation mode,
when setting the TZS bit in the TC register to "0" and the timer reloads the value of reload register and
stops. Therefore, the timer count value should be read out in programmable one-shot generation
mode and programmable wait one-shot generation mode before the timer stops.

19.3.4 Timer C

(1) The TC register and TM0 register must be read in 16-bit units. This prevents the timer value from
being updated during the period the high-byte and low-byte are being read.
Example (when Timer C is read):
MOV.W
Rev.0.91
2003 Sep 08
#10XXXXXXB,008BH
0090H,R0
; Read out timer C
page 173 of 184
19. Usage Notes

Advertisement

Table of Contents
loading

This manual is also suitable for:

R8c seriesTiny series

Table of Contents