Software Triggered One-Shot Pulse Output - NEC uPD784038 Series User Manual

16-bit single-chip microcontrollers
Table of Contents

Advertisement

8.7.5 Software Triggered One-Shot Pulse Output

In the software triggered one-shot pulse output mode, a one-shot pulse is output by software.
When the STn (n = 0/1) bit of the one-shot pulse output control register (OSPC) is set (to 1), timer output pin (TOn: n = 0,
1) is set to the active level. TOn then remains at the active level until the timer register 0 (TM0) value and the compare register
(CR0n: n = 0, 1) value match, at which point TOn changes to the inactive level. TOn then remains at the inactive level until the
STn bit is set again. TOn can also be set to the inactive level by setting (to 1) the RTn bit (n = 0/1), and in the same way, TOn
remains at the inactive level until the STn bit is set again.
TO0 and TO1 can be controlled independently.
An example of software triggered one-shot pulse output is shown in Figure 8-29.
When timer/counter 0 is stopped by clearing (to 0) the CE0 bit of the TMC0, the level at the time was stopped is retained.
Figure 8-29 Example of Software Triggered One-Shot Pulse Output
Software Trigger
0H
ST0
INTC00
ALV0
TO0
Caution "1" should not be written to STn and RTn simultaneously.
CHAPTER 8 TIMER/COUNTER 0
Count Start
"1"
Active Period
User's Manual U11316EJ4V1UD
FFFFH
Inactive Level Output
223

Advertisement

Table of Contents
loading

Table of Contents