English
Language : 

3820_03 Datasheet, PDF (154/349 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.3 Timer X and timer Y
sPulse output mode
Figure 2.3.24 shows an example of setting registers for using the pulse output mode.
[Notes on use]
Notes 1: For using interrupt processing, set the following :
•Before setting Œ below, clear the interrupt enable bits (timer X or CNTR0) and the
interrupt request bits (timer X or CNTR0) to “0.”
•After setting  below, set the interrupt enable bits (timer X or CNTR0) to “1”
(interrupts enabled).
2: Write values in the order of the timer X (low-order) and the timer X (high-order).
ŒPort P5 direction register
b7
b0
1
P5D : Port P5 direction register [Address 0B16]
b4 : Bit corresponding to port P54
1 : Output mode
Setting of timer X mode register
Select pulse output mode or others
b7
1 01
b0
TXM : Timer X mode register [Address 2716]
b0 : Timer X write control bit
0 : Write value in latch and counter
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 : P60 data for real time port
b3 : P61 data for real time port
b5, b4 : Timer X operating mode bits
0 1 : Pulse output mode
b6 : CNTR0 active edge switch bit
0 : Start at initial level “H” level output
1 : Start at initial level “L” level output
b7 : Timer X stop control 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.24 Example of setting registers for using pulse output mode
3820 GROUP USER’S MANUAL
2–67