English
Language : 

M38203M4 Datasheet, PDF (175/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.4 Timer 1, timer 2, and timer 3
(3) Pulse output by timer 2
The timer 2 can output a pulse whose polarity is reversed at each the timer 2 counter underflow.
Figure 2.4.4 shows a pulse output example.
From the moment that the TOUT output control bit is set to “1,” pulses are output from the P56/TOUT
output pin. The polarity is reversed every the timer 2 counter underflow.
To output pulses, set bit 6 of the port P5 direction register for the output mode by setting it to “1.”
Pulse output example by timer 2
•UF : Underflow
•RL : Reload
•n : The timer 2 counter initial value
Value of timer 2 counter
FF16
n16
RL
UF
0016
Timer 2 interrupt
request bit
Timer 2 interrupt
enable bit
TOUT output
control bit
Timer
1 11 111111 1
Write “1”
TOUT output active
edge switch bit
P56/TOUT pin
Programmable I/O port
1 : •Clearing by writing “0” to the timer 2 interrupt request bit.
•Clearing by accepting the timer 2 interrupt request when the timer 2 interrupt
enable bit is “1.”
Fig. 2.4.4 Pulse output example
3820 GROUP USER’S MANUAL
2–89