m37516e6hp Renesas Electronics Corporation., m37516e6hp Datasheet - Page 22
![no-image](/images/manufacturer_photos/0/5/561/renesas_electronics_corporation__sml.jpg)
m37516e6hp
Manufacturer Part Number
m37516e6hp
Description
Single-chip 8-bit Cmos Microcomputer
Manufacturer
Renesas Electronics Corporation.
Datasheet
1.M37516E6HP.pdf
(92 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
M37516E6HP
Manufacturer:
MITSUBIS
Quantity:
720
Company:
Part Number:
M37516E6HP
Manufacturer:
MITSUBISHI
Quantity:
323
Part Number:
M37516E6HP
Manufacturer:
MOTOROLA/摩托罗拉
Quantity:
20 000
7516 Group
TIMERS
The 7516 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. 15 Structure of timer XY mode register
Fig. 16 Structure of timer count source selection register
Timer 1 and Timer 2
The count source of prescaler 12 is the oscillation frequency
which is selected by timer 12 count source selection bit. The out-
put of prescaler 12 is counted by timer 1 and timer 2, and a timer
underflow sets the interrupt request bit.
Rev.1.01
b7
b 7
Jul 01, 2003
page 20 of 89
b 0
b 0
T i m e r c o u n t s o u r c e s e l e c t i o n r e g i s t e r
( T C S S : a d d r e s s 0 0 2 8
T i m e r X c o u n t s o u r c e s e l e c t i o n b i t
0 : f ( X
1 : f ( X
T i m e r Y c o u n t s o u r c e s e l e c t i o n b i t
0 : f ( X
1 : f ( X
Timer 12 count source selection bit
0 : f(X
1 : f(X
N o t u s e d ( r e t u r n s “ 0 ” w h e n r e a d )
b1b0
b5b4
Timer XY mode register
(TM : address 0023
Timer X operating mode bits
T i m e r Y o p e r a t i n g m o d e b i t s
0 0: Timer mode
0 1: Pulse output mode
1 0: Event counter mode
1 1: Pulse width measurement mode
C N T R
T i m e r X 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
C N T R
Timer Y count stop bit
I N
I N
I N
I N
IN
CIN
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: Count start
1: Count stop
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
) / 1 6 ( f ( X
) / 2 ( f ( X
) / 1 6 ( f ( X
) / 2 ( f ( X
)/16 (f(X
)
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 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
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
C I N
C I N
C I N
C I N
CIN
) / 2 a t l o w - s p e e d m o d e )
) / 2 a t l o w - s p e e d m o d e )
) / 1 6 a t l o w - s p e e d m o d e )
) / 1 6 a t l o w - s p e e d m o d e )
)/16 at low-speed mode)
1 6
)
16
)
16
”, an un-
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 the count source selected by Timer count source
selection bit.
(2) Pulse Output Mode
The timer counts the count source selected by Timer count source
selection bit. Whenever the contents of the timer reach “00
signal output from the CNTR
CNTR
at “ H”.
If it is “1”, output starts at “L”. When using a timer in this mode, set
the corresponding port P2
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 the selected signals by the count source selection bit while
the CNTR
tive edge selection bit is “1”, the timer counts it while the CNTR
(or 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 underflows.
When switching the count source by the timer 12, X and Y count
source bits, the value of timer count is altered in unconsiderable
amount owing to generating of a thin pulses in the count input
signals.
Therefore, select the timer count source before set the value to
the prescaler and the timer.
When timer X/timer Y underflow while executing the instruction
which sets “1” to the timer X/timer Y count stop bits, the timer X/
timer Y interrupt request bits are set to “1”. Timer X/Timer Y in-
terrupts are received if these interrupts are enabled at this time.
The timing which interrupt is accepted has a case after the in-
struction which sets “1” to the count stop bit, and a case after
the next instruction according to the timing of the timer under-
flow. When this interrupt is unnecessary, set “0” (disabled) to the
interrupt enable bit and then set “1” to the count stop bit.
Note
0
1
(or CNTR
pin.
1
0
) pin is at “L”.
(or CNTR
0
(or CNTR
0
0
1
(or CNTR
) active edge selection bit is “0”, output begins
(or CNTR
1
) pin is at “H”. If the CNTR
1
0
) active edge selection bit is “0”, the timer
0
(or CNTR
7
(or CNTR
( or port P4
1
1
) active edge selection bit is “0”, the
) active edge selection bit is “1”, the
0
(or CNTR
1
) pin is counted.
1
) pin is counted.
0
) direction register to out-
1
) pin is inverted. If the
0
(or CNTR
16
1
”, the
) ac-
0
or
0