English
Language : 

4524_M Datasheet, PDF (208/310 Pages) Renesas Technology Corp – 4-BIT CISC SINGLE-CHIP MICROCOMPUTER 720 FAMILY / 4500 SERIES
4524 Group
APPLICATION
2.3 Timers
➀ Disable Interrupts
Timer 1 interrupt is temporarily disabled.
Interrupt enable flag INTE
Interrupt control register V1
0
b3
b0
✕0 ✕✕
All interrupts disabled [DI]
b2: Timer 1 interrupt occurrence disabled [TV1A]
➁ Stop Timer Operation
Timer 1 is temporarily stopped.
Timer 1 count source is selected.
Timer control register W1
↓
b3
b0
0011
[TW1A]
b2: Timer 1 stop
b1, b0: CNTR0 input for Timer 1 count source
↓
➂ Set Port
CNTR0 I/O port is set to CNTR0 input port.
Register Y
b3
b0
0111
Port D7 output latch 1
Port output structure control register FR2
b3
b0
0 ✕✕✕
Timer control register W6
b3
b0
✕✕✕ 0
Specify bit position of port D [TYA]
Set to input [SD]
b3: N-channel open-drain output selected [TFR2A]
b0: Set to CNTR0 input port [TW6A]
↓
➃ Set Timer Values
Timer 1 count time is set.
Timer 1 reload register R1 “6316”
Timer count value 99 set [T1AB]
➄ Clear Interrupt Request
Timer 1 interrupt activated condition is cleared.
Timer 1 interrupt request flag T1F 0
↓
Timer 1 interrupt activated condition cleared [SNZT1]
↓
( ) Note when the interrupt request is cleared
When ➄ is executed, considering the skip of the next instruction
according to the interrupt request flag T1F,
insert the NOP instruction after the SNZT1 instruction.
➅ Start Timer Operation
Timer 1 temporarily stopped is restarted.
Timer control register W1
↓
b3
b0
0 1 1 1 b2: Timer 1 operation start [TW1A]
↓
~ Enable Interrupts
The Timer 1 interrupt which is temporarily disabled is enabled.
Interrupt control register V1
b3
b0
✕ 1 ✕ ✕ b2: Timer 1 interrupt occurrence enabled [TV1A]
Interrupt enable flag INTE 1
All interrupts enabled [EI]
↓
Input signal count started
“✕”: it can be “0” or “1.”
“[ ]”: instruction
Fig. 2.3.6 CNTR0 input setting example
However, specify the pulse width input to CNTR0 pin, CNTR1 pin. Refer to section “3.1 Electrical characteristics”
for the timer external input period condition.
Rev.2.00 Aug, 06 2004
REJ09B0107-0200Z
2-44