RX
8564 LC
6) Example of timer interrupt function setting
Set timer interrupt
function
TE
TF
TIE
Set TI / TP bit
Set TIE bit
Set TD1, TD0 bit
Initialize counter
TE
To next process
Zero-clear the TE bit to stop the timer interrupt function.
" 0 "
Zero-clear the TF bit and TIE bit to cancel the previous timer interrupt output
" 0 "
(/IRQ output).
" 0 "
1
1
Select the operation mode (one-shot interrupt or repeated continuous
interrupts).
1) When repeated continuous interrupts are selected
2) When one-shot interrupt is selected
2
2
Select event-triggered /INT output (output/do not output interrupt when at
low level).
1) Output interrupt when at low level
2) Do not output interrupt when at low level
Set the timer's countdown period (= source clock).
Select using a combination of TD1 and TD0 bit values.
3
3
Set down counter's initial value. (Reg 0F[h])
(Note) Be sure to set or reset the down counter's initial value each time.
Write "1" to the TE bit to start the timer interrupt function.
" 1 "
(Note) Before starting the timer interrupt function, be sure to set or reset the
down counter's initial value (see 3 above).
Write "1" to the TI / TP bits.
Write "0" to the TI / TP bits.
Write "1" to the TIE bit.
Write "0" to the TIE bit.
Page
31
ETM12E-01