English
Language : 

3822_03 Datasheet, PDF (131/328 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.3 Timer X and timer Y
2.3.4 Register setting example
In the following, an example of setting registers for using each mode of the timer X and timer Y is
described.
(1) Timer X
sTimer mode
Figure 2.3.22 shows an example of setting registers for using the timer mode.
[Notes on use]
Notes 1: For using interrupt processing, set the following :
•Before setting Œ below, clear the timer X interrupt enable bit and the timer X
interrupt request bit to “0.”
•After setting  below, set the timer X interrupt enable bit to “1” (interrupts enabled) .
2: Write values in the order of the timer X (low-order) and the timer X (high-order).
ŒSetting of timer X mode register
Select timer mode or others
b7
1 00
b0
TXM : Timer X mode register [Address 2716]
b0 : Timer X write control bit
0 : Write value in latch and timer
1 : Write value in latch only
b1 : Real time port control bit
0 : Real time port function invalid
1 : Real time port function valid
b2 : Data storage bit for real time port (RTP0)
b3 : Data storage bit for real time port (RTP1)
b4, b5 : Timer X operating mode bits
0 0 : Timer mode
b6 : CNTR0 active edge switch bit
b7 : Timer X operating mode bit
1 : Count stop
Set count value (low-order) to timer X (low-order) (TXL) [Address 2016]
ŽSet count value (high-order) to timer X (high-order) (TXH) [Address 2116]
Set timer X stop control bit of timer X mode register to “0” to start counting
Fig. 2.3.22 Example of setting registers for using timer mode
3822 GROUP USER’S MANUAL
2–65