r5f21368sdfp Renesas Electronics Corporation., r5f21368sdfp Datasheet - Page 593

no-image

r5f21368sdfp

Manufacturer Part Number
r5f21368sdfp
Description
Renesas Mcu R8c Family / R8c/3xt-a Series
Manufacturer
Renesas Electronics Corporation.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
r5f21368sdfp#V0
Manufacturer:
Renesas Electronics America
Quantity:
10 000
Under development
R8C/36T-A Group
R01UH0240EJ0001 Rev.0.01
Apr 28, 2011
24.3
Figure 24.2
Table 24.4
i = 1 or 3
Step
Comparator B1 and comparator B3 operate independently. Their operations are the same.
Table 24.4 lists the Procedure for Setting Registers Associated with Comparator B.
Figure 24.2 shows an Operation 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 24.4 Comparator B1 and
Comparator B3 Interrupts for details on interrupts.
1
2
3
4
5
6
Reference input voltage
Operation
Select the function of pins IVCMPi and IVREFi. Refer to 14.4 I/O of Peripheral Functions .
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
Analog input voltage (V)
Register
INTCMP register
INTiCOUT bit in
INTiIC register
Preliminary document
Specifications in this document are tentative and subject to change.
Procedure for Setting Registers Associated with Comparator B
Operation Example of Comparator Bi (i = 1 or 3)
The above diagram applies under the following conditions:
Bits INTiF1 and INTiF0 in INTF register = 00b (no filter)
INTiPL bit in INTEN register = 0 (both edges)
IR bit in
INTiCP0
INTiEN
ILVL2 to ILVL0
Select whether the filter is used or not and the sampling clock.
INTiPL
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
24. Comparator B
Page 562 of 725

Related parts for r5f21368sdfp