CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
306
User’s Manual U14492EJ3V0UD
(5) Capture/compare registers 101, 111 (CC101, CC111)
CC1n1 is a 16-bit register. It can be used as a capture register or as a compare register through specification
with capture/compare control register n (CCRn). CC1n1 can be read/written in 16-bit units.
Cautions 1. When used as a capture register (CMS1 bit of CCRn register = 0), write access from the
CPU is prohibited.
2. When used as a compare register (CMS1 bit of CCRn register = 1) and the TM1CEn bit of
the TMC1n register is “1”, overwriting the CC1n1 register values is prohibited.
3. When the TM1CEn bit of the TMC1n register is “0”, the capture trigger is disabled.
4. When the operation mode is changed from capture register to compare register, newly
set a compare value.
5. Continuous reading of CC1n1 is prohibited. If CC1n1 is continuously read, the second
read value may differ from the actual value. If CC1n1 must be read twice, be sure to read
another register between the first and the second read operation.
Correct usage example
Incorrect usage example
CC101 read
CC101 read
CC111 read
CC101 read
CC101 read
CC111 read
CC111 read
CC111 read
Remark
n = 0, 1
14
13
12
2
3
4
5
6
7
8
9
10
11
15
1
0
CC101
Address
FFFFF5E8H
Initial value
0000H
14
13
12
2
3
4
5
6
7
8
9
10
11
15
1
0
CC111
Address
FFFFF608H
Initial value
0000H
(a) When set as a capture register
When CC1n1 is set as a capture register, the valid edge of either corresponding external interrupt signal
INTP1n0 or INTP1n1 is selected with the selector, and the valid edge of the selected external interrupt
signal is detected as the capture trigger. TM1n latches the count value in synchronization with the
capture trigger (capture operation). The latched value is held in the capture register until the next capture
operation.
The valid edge of external interrupts (rising edge, falling edge, both edges) is selected with signal edge
selection register 1n (SESA1n).
When the CC1n1 register is specified as a capture register, interrupts are generated upon detection of
the valid edge of either the INTP1n0 or INTP1n1 signal.
(b) When set as a compare register
When CC1n1 is set as a compare register, it always compares its own value with the value of TM1n. If
the value of CC1n1 matches the value of the TM1n, CC1n1 generates an interrupt signal (INTCC1n1).
Содержание V850E/IA1 mPD703116
Страница 2: ...2 User s Manual U14492EJ3V0UD MEMO...