r5f21346mnfp Renesas Electronics Corporation., r5f21346mnfp Datasheet - Page 658

no-image

r5f21346mnfp

Manufacturer Part Number
r5f21346mnfp
Description
Single-chip Mcus Incorporates The R8c Cpu Core
Manufacturer
Renesas Electronics Corporation.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
r5f21346mnfp#V0
Manufacturer:
Renesas Electronics America
Quantity:
10 000
R8C/34M Group
R01UH0131EJ0100 Rev.1.00
Jun 21, 2011
31.3
Figure 31.2
Table 31.3
i = 1 or 3
1
2
3
4
5
6
Step
Comparator B1 and comparator B3 operate independently. Their operations are the same.
Table 31.3 lists the Procedure for Setting Registers Associated with Comparator B.
Figure 31.2 shows an Operating Example of Comparator Bi (i = 1 or 3).
If the analog input voltage is higher than the reference input voltage, the INTiCOUT bit in the INTCMP register is
set to 1. If the analog input voltage is lower than the reference input voltage, the INTiCOUT bit is set to 0. To use
the comparator Bi interrupt, set the INTiEN bit in the INTEN register to 1 (interrupt enabled). If the comparison
result changes at this time, a comparator Bi interrupt request is generated. Refer to 31.4 Comparator B1 and
Comparator B3 Interrupts for details of interrupts.
Select the function of pins IVCMPi and IVREFi. Refer to 7.5 Port Settings .
However, set registers and bits other than listed in step 2 and the following steps.
INTF
INTCMP
Wait for comparator stability time (100 µ s max.)
INTEN
INTiIC
Reference input voltage
Functional Description
Register
Analog input voltage (V)
INTCMP register
INTiCOUT bit in
INTiIC register
Procedure for Setting Registers Associated with Comparator B
Operating Example of Comparator Bi (i = 1 or 3)
The above applies when:
Bits INTiF1 to INTiF0 in INTF register = 00b (no filter)
INTiPL bit in the INTEN register = 0 (both edges)
i = 1 or 3
IR bit in
Select whether to enable or disable the filter.
Select the sampling clock.
INTiCP0
INTiEN
INTiPL
ILVL2 to ILVL0
IR
0
Bit
1 (operation enabled)
When using an interrupt: 1 (interrupt enabled)
When using an interrupt: Select the input polarity.
When using an interrupt: Select the interrupt priority level.
When using an interrupt: 0 (no interrupt requested: initialization)
Set to 0 by a program.
Setting Value
31. Comparator B
Page 626 of 740

Related parts for r5f21346mnfp