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

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
Example Code:
#define Device_SDA PIN_C3
#define Device_SLC PIN_C4
#use i
scl=Device_SCL)
..
..
BYTE data;
i
i
i
ADC
These options let the user configure and use the analog to digital converter module. They are only
available on devices with the ADC hardware. The options for the functions and directives vary
depending on the chip and are listed in the device header file. On some devices there are two
independent ADC modules, for these chips the second module is configured using secondary ADC
setup functions (Ex. setup_ADC2).
Relevant Functions:
setup_adc(mode)
setup_adc_ports(value)
set_adc_channel(channel)
read_adc(mode)
adc_done()
setup_adc2(mode)
setup_adc_ports2(ports, reference)
set_adc_channel2(channel)
read_adc2(mode)
adc_done()
Relevant Preprocessor:
#DEVICE ADC=xx
54
2
2
2
c_start();
c_write(data);
c_stop();
2
c(master, sda=Device_SDA,
Sets up the a/d mode like off, the adc clock etc.
Sets the available adc pins to be analog or digital.
Specifies the channel to be use for the a/d call.
Starts the conversion and reads the value. The mode can
also control the functionality.
Returns 1 if the ADC module has finished its conversion.
Sets up the ADC2 module, for example the ADC clock and
ADC sample time.
Sets the available ADC2 pins to be analog or digital, and
sets the voltage reference for ADC2.
Specifies the channel to use for the ADC2 input.
Starts the sample and conversion sequence and reads the
value The mode can also control the functionality.
Returns 1 if the ADC module has finished its conversion
Configures the read_adc return size. For example, using a
PIC with a 10 bit A/D you can use 8 or 10 for xx- 8 will
return the most significant byte, 10 will return the full A/D
reading of 10 bits
// Pin defines
// Configure Device as Master
// Data to be transmitted
// Issues a start command when in the I2C master mode.
// Sends a single byte over the I2C interface.
//Issues a stop command when in the I2C master mode.

Related parts for PCDIDE COMPILER