Timer B; Overview - Renesas M16C Series User Manual

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

Advertisement

M30240 Group

2.3 Timer B

2.3.1 Overview

The following is an overview for Timer B, a 16-bit timer.
2.3.1.1 Mode
Timer B operates only in timer mode:
• The internal count source is counted
2.3.1.2 Count source
An internal count source can be selected from f1, f8, f32 are clocks obtained by dividing the CPU main
clock by 1, 8, and 32 respectively.
2.3.1.3
Frequency division ratio
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.
2.3.1.4 Reading the timer
In timer mode, the count value at the time of reading the timer register will be read. Read the register in
16-bit increments.
2.3.1.5 Writing to the timer
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.
2.3.1.6 Pins related to Timer B
None
2.3.1.7 Registers related to Timer B
Figure 2.33 shows the memory map of Timer B-related registers. Figure 2.34 and Figure 2.35 show
Timer B-related registers.
Figure 2.33: Memory map of Timer B related registers
Rev.1.00 Sep 24, 2003 Page 172 of 360
005A
Timer B0 interrupt control register
16
005B
Timer B1 interrupt control register
16
0380
Count start flag
16
0390
16
Timer B0
0391
16
0392
16
Timer B2
0393
16
0394
16
Timer B2
0395
16
039B
Timer B0 mode register
16
039C
Timer B1 mode register
16
039C
Timer B2 mode register
16
See section 2.3.2.1
TB0IC
TB1IC
TABSR
U2BRG
TB0
TB2
TB2
TB0MR
TB1MR
TB2MR
Timer B

Advertisement

Table of Contents
loading

Table of Contents