![](http://datasheet.mmic.net.cn/180000/M38B52E2XXXFS_datasheet_11315976/M38B52E2XXXFS_24.png)
MITSUBISHI MICROCOMPUTERS
38B5 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
23
PRELIMINAR
Y
Notice:
This
is not
a final
specification.
Some
parametric
limits
are
subject
to change.
Fig. 18 Structure of Timer X Related Registers
b7
b0
Timer X mode register 1
(TXM1 : address 002E16)
Timer X write control bit
0 : Write data to both timer latch and timer
1 : Write data to timer latch only
Timer X count source selection bits
b2 b1
0
0 : f(XIN)/2 or f(XCIN)/4
0
1 : f(XIN)/8 or f(XCIN)/16
1
0 : f(XIN)/64 or f(XCIN)/128
1
1 : Not available
Not used (returns "0" when read)
Timer X operating mode bits
b5 b4
0
0 : Timer mode
0
1 : Pulse output mode
1
0 : Event counter mode
1
1 : Pulse width measurement mode
CNTR2 active edge switch bit
0 : Event counter mode ; counts rising edges
Pulse output mode ; output starts with “H” level
Pulse width measurement mode ; measures “H” periods
1 : Event counter mode ; counts falling edges
Pulse output mode ; output starts with “L” level
Pulse width measurement mode ; measures “L” periods
Timer X stop control bit
0 : Count operating
1 : Count stop
Real time port control bit (P85)
0 : Real time port function is invalid
1 : Real time port function is valid
Real time port control bit (P86)
0 : Real time port function is invalid
1 : Real time port function is valid
P85 data for real time port
P86 data for real time port
Not used (returns "0" when read)
Timer X mode register 2
(TXM2 : address 002F16)
b7
b0
Fig. 17 Block Diagram of Timer X
CNTR2 active
edge switch bit
CNTR2 active
edge switch bit
Real time port
control bit
Real time port
control bit
S
“0”
“1”
“0”
“1”
“10”
“00”,“01”,“11”
Q
T
P61/CNTR0/CNTR2
CNTR0
“1”
“0”
“1”
“0”
“1”
“0”
Q D
P85
P86
“1”
“0”
XIN
XCIN
“1”
“0”
1/2
1/8
1/64
P61 latch
Timer X (low-order) (8)
Timer X (high-order) (8)
Timer X latch (high-order) (8)
Timer X latch (low-order) (8)
Data bus
Pulse output mode
P61 direction
register
Pulse width
measurement mode
Timer X operating
mode bit
Timer X stop
control bit
Pulse output mode
Count source selection bit
Internal system clock
selection bit
Divider
Timer X write
control bit
Timer X
interrupt request
Timer X mode register
write signal
P86 latch
P86 direction
register
P85 latch
P85 direction
register
Latch
P85 data for real time port
Real time port
control bit (P85)
P86 data for real time port
Real time port
control bit (P86)
Timer X mode register
write signal