icrekha
Newbie level 4
hi... i have developed he pgm for adc conversion in ccs compiler.. can anyone plz check and verify the codings???
void main ()
{
int value;
long digital;
setup_adc_ports(ALL_ANALOG);
setup_adc(ADC_CLOCK_DIV_2);
setup_adc_channel(1);
input (PIN_A0);
value=read_adc();
read_adc(ADC_START_ONLY);
sleep();
digital=read_adc(ADC_READ_ONLY);
}
void main ()
{
int value;
long digital;
setup_adc_ports(ALL_ANALOG);
setup_adc(ADC_CLOCK_DIV_2);
setup_adc_channel(1);
input (PIN_A0);
value=read_adc();
read_adc(ADC_START_ONLY);
sleep();
digital=read_adc(ADC_READ_ONLY);
}