![NEC V850/SC1 Скачать руководство пользователя страница 288](http://html.mh-extra.com/html/nec/v850-sc1/v850-sc1_user-manual_248178288.webp)
CHAPTER 8 TIMER/COUNTER FUNCTION
286
User’s Manual U15109EJ3V0UD
Remarks 1.
0/1: When these bits are reset to 0 or set to 1, the other functions can be used along with the
square-wave output function. For details, refer to
8.1.4 (1) 16-bit timer mode control
registers 0, 1, 7 to 12 (TMC0, TMC1, TMC7 to TMC12)
and
(2) Capture/compare control
registers 0, 1, 7 to 12 (CRC0, CRC1, CRC7 to CRC12)
.
2.
n = 0, 1, 7 to 12
Figure 8-22. Timing of Square-Wave Output Operation
&
%'
'
'
−
−
!
%'
'
'
'
Remark
n = 0, 1, 7 to 12
8.2.6 Operation as one-shot pulse output
TMn can output a one-shot pulse in synchronization with a software trigger and an external trigger (TIn0 pin input).
(1) One-shot pulse output via software trigger
A one-shot pulse can be output from the TOn pin by setting 16-bit timer mode control register n (TMCn),
capture/compare control register n (CRCn), and 16-bit timer output control register n (TOCn) as shown in Figure
8-23, and by setting bit 6 (OSPTn) of TOCn by software.
By setting OSPTn to 1, the 16-bit timer/event counter is cleared and started, and its output is asserted active at
the count value (N) preset to 16-bit capture/compare register n1 (CRn1). After that, the output is deasserted
inactive at the count value (M) preset to 16-bit capture/compare register n0 (CRn0)
490
.
Even after the one-shot pulse has been output, TMn continues its operation. To stop TMn, TMCn must be reset
to 00H.
Note
This is an example when N < M. When N > M, the output becomes active at the CRn0 value and inactive
at the CRn1 value.
Caution
Do not set OSPTn to 1 while the one-shot pulse is being output. To output the one-shot pulse
again, wait until the current one-shot pulse output ends.
Remark
n = 0, 1, 7 to 12