BAT32G1x9 user manual | Chapter 8 Timer B
270 / 1149
Rev.1.02
8.3.9
Timer B universal registers A, B, C, D
(TBGRA,
TBGRB,
TBGRC, TBGRD)
The TBGRA registers and TBGRB registers are 16-bit read-write registers with the function of output comparison
registers and input capture registers. Function conversion via TBIOR registers.
When used as output comparison registers, the values of tbGRA registers and TBGRB registers are always
compared to the values of TB registers. If the values are the same (the comparison matches), the TBSR register's
TBIMFA bit or TBIMFB bit becomes "1". Matching outputs can be set through TBIOR registers.
When used as an input capture register, the value of the TB register is saved after an external input capture
signal is detected. At this point, the TBSR register
The TBIMFA bit or TBIMFB bit becomes "1". The TBIOR register selects the detection edge of the input capture
signal.
TbGRC registers and TBGRD registers can also be used as buffer registers for TBGRA registers and TBGRB
registers, respectively, and can pass through the TBBUFA bit sum of the TBIBOR registers The TBBUFB bit selects
this feature.
For example, if you set the TBGRA register as the output comparison register and the TBGRC register as the
buffer register of the TBGRA register, the value of the TBGRC register is passed to each time the comparison match
A occurs TBGRA registers.
If the TBGRA register is set as the input capture register and the TBGRC register is set as the buffer register of
the TBGRA register, the values of the TB register and the TBGRA register are passed to each other when the input
capture occurs TBGRA registers and TBGRC registers.
Can read and write TBGRA, TBGRB, TBGRC, TBGRD registers in 16-bit increments.
Fig. 8-10 Timer B universal registers A, B, C, D (TBGRA, TBGRB, TBGRC, TBGRD) format
Address: 40042658H
(TBGRA),
4004265AH
(TBGRB),
After Reset:
FFFFH R/W
40042660H(TBGRC), 40042662H(TBGRD)
Symbol 15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
TBGRi
—
function
bit15
~
0
Varies by timer mode and function.
TbGRA,
TBGRB,
TBGRC,
TBGRD
register functions are shown in Table 8-4.
Remark:i=A, B, C, D