PCDIDE COMPILER Custom Computer Services Inc (CCS), PCDIDE COMPILER Datasheet - Page 279

PCD C-COMPILER PIC24, DSPIC

PCDIDE COMPILER

Manufacturer Part Number
PCDIDE COMPILER
Description
PCD C-COMPILER PIC24, DSPIC
Manufacturer
Custom Computer Services Inc (CCS)
Type
Compilerr
Datasheet

Specifications of PCDIDE COMPILER

For Use With/related Products
Microchip PIC24/dsPIC®
Lead Free Status / RoHS Status
Not applicable / Not applicable
Other names
429-1008
setup_comparator( )
Syntax:
Parameters:
Returns:
Function:
Availability:
Requires
Examples:
Example Files:
Also See:
setup_comparator (mode)
mode is a bit-field comprised of the following constants:
NC_NC_NC_NC
A4_A5_NC_NC
A4_VR_NC_NC
A5_VR_NC_NC
NC_NC_A2_A3
NC_NC_A2_VR
NC_NC_A3_VR
A4_A5_A2_A3
A4_VR_A2_VR
A5_VR_A3_VR
C1_INVERT
C2_INVERT
C1_OUTPUT
C2_OUTPUT
void
Configures the voltage comparator.
The voltage comparator allows you to compare two voltages and find the greater of
them. The configuration constants for this function specify the sources for the
comparator in the order C1- C1+, C2-, C2+.The constants may be or’ed together if
the NC’s do not overlap; A4_A5_NC_NC | NC_NC_A3_VR is valid, however,
A4_A5_NC_NC | A4_VR_NC_NC may produce unexpected results. The results of
the comparator module are stored in C1OUT and C2OUT, respectively. Cx_INVERT
will invert the results of the comparator and Cx_OUTPUT will output the results to
the comparator output pin.
Some devices, consult your target datasheet.
Constants are defined in the devices .h file.
setup_comparator(A4_A5_NC_NC);//use C1, not C2
Analog Comparator overview
265

Related parts for PCDIDE COMPILER