English
Language : 

UPD784938 Datasheet, PDF (311/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 11 TIMER/EVENT COUNTER 2
(5) Edge detection circuit
The edge detection circuit detects an external input valid edge.
This circuit generates an external interrupt request (INTP1) and capture trigger by detecting the valid edge of the INTP1
pin input specified by the external interrupt mode register 0 (INTM0). It also generates a capture trigger, the count
clock of an external event, and external interrupt request (INTP2) by detecting the valid edge from an external interrupt
request input pin (INTP2).
(6) Output control circuit
It is possible to invert the timer output when the CR20/CR21 register contents and the contents of TM2 match or the
CR20W/CR21W contents and the contents of TM2W match.
A square wave can be output from the timer output pins (TO2/TO3) in accordance with the setting of the high-order
4 bits of the timer output control register (TOC). At this time, PWM output or PPG output can be performed according
to the specification of the capture/compare control register 2 (CRC2).
Timer output can be disabled/enabled by means of the TOC register. When timer output is disabled, a fixed level is
output to the TO2 and TO3 pins (the output level is set by the TOC register).
(7) Prescaler
The prescaler generates the count clock from the internal system clock. The clock generated by the prescaler is selected
by the selector, and is used as the count clock by the timer counter 2 (TM2/TM2W) to perform count operations.
(8) Selector
The selector selects a signal resulting from dividing the internal clock or the edge detected by the edge detection circuit
as the count clock of timer counter 2 (TM2/TM2W).
Preliminary User’s Manual U13987EJ1V0UM00
311