NEC 78K0 User Manual page 128

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0:
Table of Contents

Advertisement

(3) 16-bit timer capture/compare register 010 (CR010)
CR010 is a 16-bit register that has the functions of both a capture register and a compare register. Whether it is
used as a capture register or a compare register is set by bit 2 (CRC002) of capture/compare control register 00
(CRC00).
CR010 can be set by a 16-bit memory manipulation instruction.
RESET input clears CR010 to 0000H.
Figure 6-4. Format of 16-Bit Timer Capture/Compare Register 010 (CR010)
Address: FF14H, FF15H
Symbol
CR010
• When CR010 is used as a compare register
The value set in CR010 is constantly compared with the 16-bit timer counter 00 (TM00) count value, and an
interrupt request (INTTM010) is generated if they match. The set value is held until CR010 is rewritten.
• When CR010 is used as a capture register
It is possible to select the valid edge of the TI000 pin as the capture trigger. The TI000 valid edge is set using
prescaler mode register 00 (PRM00) (see Table 6-3).
Table 6-3. CR010 Capture Trigger and Valid Edge of TI000 Pin (CRC002 = 1)
CR010 Capture Trigger
Falling edge
Rising edge
Both rising and falling edges
Remarks 1. Setting ES001, ES000 = 1, 0 is prohibited.
2. ES001, ES000: Bits 5 and 4 of prescaler mode register 00 (PRM00)
CRC002:
Cautions 1. If the CR010 register is cleared to 0000H, an interrupt request (INTTM010) is generated after
the TM00 register overflows, after the timer is cleared and started on a match between the
TM00 register and the CR000 register, or after the timer is cleared by the valid edge of TI000
or a one-shot trigger.
2. When CR010 is used as a capture register, read data is undefined if the register read time
and capture trigger input conflict (the capture data itself is the correct value).
If count stop input and capture trigger input conflict, the captured data is undefined.
3. CR010 can be rewritten during TM00 operation. For details, see Caution 2 in Figure 6-15.
128
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
After reset: 0000H
FF15H
Falling edge
Rising edge
Both rising and falling edges
Bit 2 of capture/compare control register 00 (CRC00)
User's Manual U16227EJ2V0UD
R/W
FF14H
TI000 Pin Valid Edge
ES001
ES000
0
0
0
1
1
1

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

78kc1

Table of Contents