M38867E8AHP MITSUBISHI [Mitsubishi Electric Semiconductor], M38867E8AHP Datasheet - Page 24

no-image

M38867E8AHP

Manufacturer Part Number
M38867E8AHP
Description
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER??
Manufacturer
MITSUBISHI [Mitsubishi Electric Semiconductor]
Datasheets

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
M38867E8AHP
Quantity:
360
Part Number:
M38867E8AHP
Manufacturer:
MITSUBISHI
Quantity:
20 000
Part Number:
M38867E8AHP EA
Manufacturer:
FUJI
Quantity:
10 800
Part Number:
M38867E8AHP EA
Manufacturer:
RENESAS
Quantity:
1 000
Part Number:
M38867E8AHP EA
Manufacturer:
RENESAS/瑞萨
Quantity:
20 000
TIMERS
The 3886 group has four timers: timer X, timer Y, timer 1, and
timer 2.
The division ratio of each timer or prescaler is given by 1/(n + 1),
where n is the value in the corresponding timer or prescaler latch.
All timers are count down. When the timer reaches “00
derflow occurs at the next count pulse and the corresponding
timer latch is reloaded into the timer and the count is continued.
When a timer underflows, the interrupt request bit corresponding
to that timer is set to “1”.
Fig. 19 Structure of timer XY mode register
24
b 7
b 0
b 1 b 0
b 5 b 4
T i m e r X Y m o d e r e g i s t e r
( T M : a d d r e s s 0 0 2 3
T i m e r X o p e r a t i n g m o d e b i t
0 0 : T i m e r m o d e
0 1 : P u l s e o u t p u t m o d e
1 0 : E v e n t c o u n t e r m o d e
1 1 : P u l s e w i d t h m e a s u r e m e n t m o d e
C N T R
T i m e r X c o u n t s t o p b i t
T i m e r Y o p e r a t i n g m o d e b i t
C N T R
T i m e r Y c o u n t s t o p b i t
0 0 : T i m e r m o d e
0 1 : P u l s e o u t p u t m o d e
1 0 : E v e n t c o u n t e r m o d e
1 1 : P u l s e w i d t h m e a s u r e m e n t m o d e
1 : I n t e r r u p t a t r i s i n g e d g e
0 : C o u n t s t a r t
1 : I n t e r r u p t a t r i s i n g e d g e
0 : C o u n t s t a r t
1 : C o u n t s t o p
0 : I n t e r r u p t a t f a l l i n g e d g e
1 : C o u n t s t o p
0 : I n t e r r u p t a t f a l l i n g e d g e
C o u n t a t r i s i n g e d g e i n e v e n t
C o u n t a t f a l l i n g e d g e i n e v e n t
C o u n t a t r i s i n g e d g e i n e v e n t
c o u n t e r m o d e
C o u n t a t f a l l i n g e d g e i n e v e n t
c o u n t e r m o d e
c o u n t e r m o d e
c o u n t e r m o d e
0
1
a c t i v e e d g e s e l e c t i o n b i t
a c t i v e e d g e s e l e c t i o n b i t
1 6
)
16
”, an un-
Timer 1 and Timer 2
The count source of prescaler 12 is the oscillation frequency di-
vided by 16. The output of prescaler 12 is counted by timer 1 and
timer 2, and a timer underflow sets the interrupt request bit.
Timer X and Timer Y
Timer X and Timer Y can each select in one of four operating
modes by setting the timer XY mode register.
(1) Timer Mode
The timer counts f(X
(2) Pulse Output Mode
Timer X (or timer Y) counts f(X
the timer reach “00
CNTR
lection bit is “0”, output begins at “ H”.
If it is “1”, output starts at “L”. When using a timer in this mode, set
the corresponding port P5
put mode.
(3) Event Counter Mode
Operation in event counter mode is the same as in timer mode,
except that the timer counts signals input through the CNTR
CNTR
When the CNTR
rising edge of the CNTR
When the CNTR
falling edge of the CNTR
(4) Pulse Width Measurement Mode
If the CNTR
counts f(X
CNTR
counts while the CNTR
The count can be stopped by setting “1” to the timer X (or timer Y)
count stop bit in any mode. The corresponding interrupt request
bit is set each time a timer overflows.
The count source for timer Y in the timer mode or the pulse output
mode can be selected from either f(X
Y count source selection bit of the port control register 2 (bit 5 of
address 002F
1
1
0
) pin is inverted. If the CNTR
pin.
(or CNTR
IN
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
0
)/16 while the CNTR
(or CNTR
16
).
0
0
(or CNTR
1
(or CNTR
) active edge selection bit is “1”, the timer
IN
16
MITSUBISHI MICROCOMPUTERS
)/16.
”, the signal output from the CNTR
0
1
0
) active edge selection bit is “0”, the timer
(or CNTR
0
(or CNTR
4
(or CNTR
( or port P5
1
1
) active edge selection bit is “0”, the
) active edge selection bit is “1”, the
IN
0
)/16. Whenever the contents of
1
(or CNTR
) pin is at “L”.
1
0
) pin is counted.
1
IN
) pin is counted.
(or CNTR
)/16 or f(X
5
) direction register to out-
3886 Group
1
) pin is at “H”. If the
1
) active edge se-
CIN
) by the timer
0
0
(or
or

Related parts for M38867E8AHP