CHAPTER 7 TIMER/COUNTER FUNCTION
User’s Manual U13850EJ4V0UM
181
Cautions 1. When the bit other than the OVFn flag is written, be sure to stop the timer operation.
2. The valid edge of the TIn0 pin is set by using prescaler mode register n0 (PRMn0).
3. When a mode in which the timer is cleared and started on a match between TMn and CRn0,
the OVFn flag is set to 1 when the count value of TMn changes from FFFFH to 0000H with
CRn0 set to FFFFH.
Remark
TOn:
Output pin of timer n
TIn0:
Input pin of timer n
TMn:
16-bit timer register n
CRn0: Compare register n0
CRn1: Compare register n1
(2) Capture/compare control registers 0, 1 (CRC0, CRC1)
CRCn controls the operation of capture/compare register n (CRn0 and CRn1).
CRCn is set by an 8-/1-bit memory manipulation instruction.
RESET input clears CRC0 and CRC1 to 00H.
Figure 7-3. Capture/Compare Control Registers 0, 1 (CRC0, CRC1)
After reset: 00H R/W
Address: FFFFF20AH, FFFFF21AH
7
6
5
4
3
2
1
0
CRCn
0
0
0
0
0
CRCn2
CRCn1
CRCn0
(n = 0, 1)
CRCn2
Selects operation mode of CRn1
0
Operates as compare register
1
Operates as capture register
CRCn1
Selects capture trigger of CRn0
0
Captured at valid edge of TIn1
1
Captured in reverse phase of valid edge of TIn0
CRCn0
Selects operation mode of CRn0
0
Operates as compare register
1
Operates as capture register
Cautions 1. Before setting CRCn, be sure to stop the timer operation.
2. When the mode in which the timer is cleared and started on a match between TMn and
CRn0 is selected by 16-bit timer mode control register n (TMCn), do not specify CRn0 as
a capture register.
3. When both the rising edge and falling edge are specified for the TIn0 valid edge, the
capture operation does not work.
4. For the capture trigger, a pulse longer than twice the count clock selected by prescaler
mode registers 0n, 1n (PRM0n, PRM1n) is required in order that the signals from TIn0
and T2n1 perform the capture operation correctly.
Содержание MPD703030A
Страница 2: ...User s Manual U13850EJ4V0UM 2 MEMO ...
Страница 514: ...User s Manual U13850EJ4V0UM 514 MEMO ...