Timer Mode - Renesas M16C Series User Manual

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

Advertisement

M30240 Group
Timer Bi register (Note)
(b15)
b7
Count start flag
b7
b6
Figure 1.72: Timer B-related registers (2)

1.2.22.1 Timer mode

In this mode, the timer counts an internally generated count source as shown in Table 1.23 .
Table 1.23:
Timer B timer specifications in timer mode
Item
Count source
Count operation
Divide ratio
Count start condition
Count stop condition
Interrupt request
generation timing
Read from timer
Write to timer
Note: Timer B2 does not generate an interrupt; it is used as a prescaler only.
Rev.1.00 Sep 24, 2003 Page 77 of 360
(b8)
b0 b7
b0
• Timer mode
Counts the timer's period
Note: Read and write data in 16-bit units.
Symbol
b5
b4
b3
b2
b1
b0
TABSR
Bit symbol
TA0S
Timer A0 count start flag
TA1S
Timer A1 count start flag
TA2S
Timer A2 count start flag
TA3S
Timer A3 count start flag
TA4S
Timer A4 count start flag
TB0S
Timer B0 count start flag
TB1S
Timer B1 count start flag
TB2S
Timer B2 count start flag
f1, f8, f32
• Counts down
• When the timer underflows, it reloads the reload register contents before continuing counting
1/(n+1)
n: Set value
Count start flag is set (= 1)
Count start flag is reset (= 0)
The timer underflows (see Note)
Count value is read out by reading timer Bi register
• When counting stopped
When a value is written to Timer Bi register, it is written to both reload register and counter
• When counting is in progress
When a value is written to Timer Bi register, it is written to only reload register
(Transferred to counter at the next reload time)
Symbol
Address
TB0
0391
16
TB1
0393
16
TB2
0395
16
Function
Values that can be set
0000
to FFFF
16
Address
When reset
0380
00
16
16
Bit name
Function
0 : Stops counting
1 : Starts counting
Specification
When reset
, 0390
Indeterminate
16
, 0392
Indeterminate
16
, 0394
Indeterminate
16
R
W
16
R
W
Timer B

Advertisement

Table of Contents
loading

Table of Contents