24
MITSUBISHI MICROCOMPUTERS
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3807 Group
Fig. 16. Structure of Timer X mode register, Timer Y mode register, and Timer XY control register
Timer Y mode register
(TYM : address 002816)
b7
b0
Timer X mode register
(TXM : address 002716)
Timer X operating mode bits
b2 b1 b0
0
0 : Timer event counter mode
0
1 : Pulse output mode
0
1
0 : Pulse period measurement mode
0
1
1 : Pulse width measurement mode
1
0
0 : Programmable waveform generating mode
1
0
1 : Programmable one-shot generating mode
1
0 : PWM mode
1
1 : Not used
b7
b0
Timer X count source selection bits
b7 b6
0
0 : f(XIN)/2
0
1 : f(XIN)/16
1
0 : f(XCIN)
1
1 : Input signal from CNTR0 pin
CNTR0 active edge switch bit
0 : Event counter mode ; counts rising edges
Pulse output mode ; output starts with “H” level
Pulse period measurement mode ;
measures between two falling edges
Pulse width measurement mode ; measures “H” periodes
Programmable one-shot generating mode ;
after start at “L” level, output a “H” pulse
(interrupt request is triggered on falling edge)
1 : Eevent counter mode ; counts falling edges
Pulse output mode ; output starts with “L” level
Pulse period measurement mode ;
measures between two rising edges
Pulse width measurement mode ; measures “L” periodes
Programmable one-shot generating mode ;
after start at “H” level, output a
“L” pulse
(interrupt request is triggered on rising edge)
Timer X write control bit
0 : Write data to both timer latch and timer
1 : Write data to timer latch only
Output level latch
0 : "L" output
1 : "H" output
Timer Y operating mode bits
b2 b1 b0
0
0 : Timerevent counter mode
0
1 : Pulse output mode
0
1
0 : Pulse period measurement mode
0
1
1 : Pulse width measurement mode
1
0
0 : Programmable waveform generating mode
1
0
1 : Programmable one-shot generating mode
1
0 : PWM mode
1
1 : Not used
Timer Y count source selection bits
b7 b6
0
0 : f(XIN)/2
0
1 : f(XIN)/16
1
0 : f(XCIN)
1
1 : Input signal from CNTR1 pin
Timer Y write control bit
0 : Write data to both timer latch and timer
1 : Write data to timer latch only
Output level latch
0 : "L" output
1 : "H" output
CNTR1 active edge switch bit
0 : Event counter mode ; counts rising edges
Pulse output mode ; output starts with “H” level
Pulse period measurement mode ;
measures between two falling edges
Pulse width measurement mode ; measures “H” periodes
Programmable one-shot generating mode ;
after start at “L” level, output a “H” pulse
(interrupt request is triggered on falling edge)
1 : Eevent counter mode ; counts falling edges
Pulse output mode ; output starts with “L” level
Pulse period measurement mode ;
measures between two rising edges
Pulse width measurement mode ; measures “L” periodes
Programmable one-shot generating mode ;
after start at “H” level, output a
“L” pulse
(interrupt request is triggered on rising edge)
Timer XY control register
(TXYCON : address 001416)
Not used (returns “0” when read)
Timer X stop control bit
0 : start counting
1 : stop counting
Timer Y stop control bit
0 : start counting
1 : stop counting
b7
b0