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

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
Requires:
Examples:
Also See:
set_adc_channel( )
set_adc_channel2( )
Syntax:
Parameters:
Returns:
Function:
Availability:
Requires:
Examples:
Example Files:
Also See:
252
#USE RTOS
void yield(void)
{
}
None
set_adc_channel (chan [,neg]))
set_adc_channel2(chan)
chan is the channel number to select. Channel numbers start at 0 and are
labeled in the data sheet AN0, AN1. For devices with a differential ADC it sets the
positive channel to use.
neg is optional and is used for devices with a differential ADC only. It sets the
negative channel to use, channel numbers can be 0 to 6 or VSS. If no parameter
is used the negative channel will be set to VSS by default.
undefined
Specifies the channel to use for the next read_adc() call. Be aware that you must
wait a short time after changing the channel before you can get a valid read. The
time varies depending on the impedance of the input source. In general 10us is
good for most applications. You need not change the channel before every read if
the channel does not change.
Only available on devices with built in analog to digital converters
Nothing
set_adc_channel(2);
value = read_adc();
ex_admm.c
read_adc(), setup_adc(), setup_adc_ports(),
printf(“Yielding...\r\n”);
rtos_yield();
printf(“Executing code after yield\r\n”);
ADC Overview

Related parts for PCDIDE COMPILER