M30622MA-XXXFP RENESAS [Renesas Technology Corp], M30622MA-XXXFP Datasheet - Page 327

no-image

M30622MA-XXXFP

Manufacturer Part Number
M30622MA-XXXFP
Description
16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet
Timer B
312
2.3 Timer B
2.3.1 Overview
The following is an overview for timer B, a 16-bit timer.
(1) Mode
(2) Count source
(3) Frequency division ratio
(4) Reading the timer
(5) Writing to the timer
Timer B operates in one of three modes:
(a) Timer mode
(b) Event counter mode
(c) Pulse period measurement/pulse width measurement mode
An internal count source can be selected from f
dividing the CPU main clock by 1, 8, and 32 respectively. f
CPU secondary clock by 32.
The frequency division ratio equals [the value set in the timer register + 1]. The counter underflows
when a count source equal to a frequency division ratio is input, and an interrupt request occurs.
In timer mode or event counter mode, the count value at the time of reading the timer register will be
read. Read the register in 16-bit increments. In both the pulse period measurement mode and pulse
width measurement mode, an indeterminate value is read until the second effective edge is input after
a count is started, otherwise, the measurement results are read.
When writing to the timer register while a count is in progress, the value is written only to the reload
register. When writing to the timer register while a count has stopped, the value is written both to the
reload register and the count. Write the value in 16-bit increments. The timer register cannot be
written to in either the pulse period measurement mode or the pulse width measurement mode.
• Operation in timer mode ........................................................................................................... P316
• Operation in event counter mode ............................................................................................. P318
• Operation in pulse period measurement mode ........................................................................ P320
• Operation in pulse width measurement mode .......................................................................... P322
The internal count source is counted.
The number of pulses coming from outside and the number of the timer overflows are counted.
External pulse period or external pulse widths are measured. If pulse period measurement mode is
selected, the periods of input pulses are continuously measured. If pulse width measurement mode
is selected, widths of “H” level pulses and those of “L” level pulses are continuously measured.
1
, f
8
, f
32
, and f
C32
C32
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
. f
is the clock obtained by dividing the
1
, f
8
, and f
32
are clocks obtained by
Mitsubishi microcomputers
M16C / 62 Group

Related parts for M30622MA-XXXFP