Base Timer - Renesas M16C/29 Series User Manual

Hide thumbs Also See for M16C/29 Series:
Table of Contents

Advertisement

M
1
6
C
2 /
9
G
o r
u
p

13.1 Base Timer

The base timer is a free-running counter that counts an internally generated count source.
Table 13.2 lists specifications of the base timer. Table 13.3 shows registers associated with the base timer.
Figure 13.11 shows a block diagram of the base timer. Figure 13.12 shows an example of the base timer
in counter increment mode. Figure 13.13 shows an example of the base timer in counter increment/decre-
ment mode. Figure 13.14 shows an example of two-phase pulse signal processing mode.
Table 13.2 Base Timer Specifications
Item
Count source(f
)
BT1
Counting operation
Count start condition
Count stop condition
Base timer reset condition
Value for base timer reset
Interrupt request
Read from timer
Write to timer
Selectable function
R
e
. v
1
1 .
2
M
r a
3 .
, 0
2
0
0
7
R
E
J
0
9
B
0
1
0
1
0 -
1
1
2
f
or f
divided by
1
2
n: determined by the DIV7 to DIV0 bits in the G1DV register. n=0 to 255
However, no division when n=0
The base timer increments the counter value
The base timer increments/decrements the counter value
Two-phase pulse signal processing
The BTS bit in the G1BCR1 register is set to 1 (base timer starts counting)
The BTS bit in the G1BCR1 register is set to 0 (base timer reset)
(1) The value of the base timer matches the value of the G1BTRR register
(2) The value of the base timer matches the value of G1PO0 register.
(3) Apply a low-level signal ("L") to external interrupt pin,INT1 pin
0000
16
The base timer interrupt request is generated:
(1) When the bit 14 or bit 15 in the base timer overflows
(2) The value of the base timer value matches the value of the base timer
reset register
• The G1BT register indicates a counter value while the base timer is running
• The G1BT register is undefined when the base timer is reset
When a value is written while the base timer is running, the timer counter
immediately starts counting from this value. No value can be written while
the base timer is reset.
• Counter increment/decrement mode
The base timer starts counting from 0000
the timer counter is then decremented back to 0000
increments the counter value again when the timer counter reaches 0000
(See Figure 13.13)
• Two-phase pulse processing mode
Two-phase pulse signals from pins P8
13.14)
page 151
f o
4
5
8
(n+1)
,
two-phase pulse input divided by
P8
0
P8
1
The timer increments
a counter on all edges
Specification
________
. After incrementing to FFFF
16
. The base timer
16
and P8
are counted (See Figure
0
1
The timer decrements
a counter on all edges
13. Timer S
(n+1)
,
16
.
16

Advertisement

Table of Contents
loading

Table of Contents