Renesas M16C/64A Series User Manual page 475

Table of Contents

Advertisement

M16C/64A Group
Table 22.20 Registers and Setting Values in Input Capture Mode (Simultaneous Count Operation) (2/2)
Register
PMCiINT
PMC0CPC
PMC0CPD
PMCiHDPMIN
PMCiHDPMAX
PMCiD0PMIN
PMCiD0PMAX
PMCiD1PMIN
PMCiD1PMAX
PMCiTIM
PMC0DAT0 to
PMC0DAT5
PMC0RBIT
i = 0, 1
-: Unimplemented bits in PMC1
Note:
1.
This table does not describe a procedure.
22.3.5.1
Setting Procedure
To start or stop counting, follow these steps:
(1) Set bits CSRC1 to CSRC0 and bits CDIV1 to CDIV0 in the PMCiCON3 register.
(2) Set bits PSEL1 to PSEL0 in the PMCiCON2 register and bits FIL and SINV in the PMCiCON0
register.
(3) Wait for four cycles of the count source.
(4) Set the EN bit in the PMC1CON0 register to 1 (0 to stop).
(5) Set the EN bit in the PMC0CON0 register to 1 (0 to stop).
(6) Wait for two cycles of the count source.
(7) Confirm that the ENFLG bit in the PMC0CON2 register is 1 (0 to stop). (The ENFLG bit in the
PMC1CON2 register is disabled)
22.3.5.2
Count Operation
In input capture mode, the counter counts from 0000h to FFFFh, and then returns to 0000h to
continue counting.
When the counter becomes 0000h after FFFFh, the CEFLG bit in the PMCiCON2 register becomes 1
(counter overflow) and stays 1 until the next measurement.
R01UH0136EJ0210 Rev.2.10
Jul 31, 2012
Bit
CPINT
Set to 0.
REINT
Set to 0.
DRINT
Set to 0.
BFULINT
Set to 0.
PTHDINT
Set to 0.
PTDINT
Set to 0.
Set to 1 when using timer
TIMINT
measure interrupt.
SDINT
Set to 0.
CPN0
CPN1
Set to 000b.
CPN2
CPEN
Set to 0.
0 to 7
Set to 00h.
0 to 10
Set to 0000h.
0 to 10
Set to 0000h.
0 to 7
Set to 00h.
0 to 7
Set to 00h.
0 to 7
Set to 00h.
0 to 7
Set to 00h.
Measured value of pulse
0 to 15
period or width can be read.
0 to 7
Not used.
0 to 5
Not used.
22. Remote Control Signal Receiver
Function
PMC0
Set to 0.
Set to 0.
Set to 0.
Set to 0.
Set to 1 when using timer
measure interrupt.
Set to 0000h.
Set to 0000h.
Set to 00h.
Set to 00h.
Set to 00h.
Set to 00h.
Measured value of pulse
period or width can be read.
Not used.
Not used.
(1)
PMC1
-
-
-
-
-
-
Page 442 of 800

Advertisement

Table of Contents
loading

Table of Contents