|
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
|
▷ |