How can I make the following code shorter using a for loop?
Do I have to include a header file?
while(1){// run forever in a loop
OpenADC(ADC_FOSC_32 & ADC_RIGHT_JUST & ADC_20_TAD,ADC_CH0 & ADC_INT_OFF & ADC_VREFPLUS_VDD &
ADC_VREFMINUS_VSS, 0b1011);
SetChanADC(ADC_CH0); /* Selects the pin used as i/p to the */
ConvertADC( ); /* start A/D conversion */
while(BusyADC( )); /* wait for completion */
/* Get results and...
PIC18F4520 4 ADC inputs
Do I have to include a header file?
while(1){// run forever in a loop
OpenADC(ADC_FOSC_32 & ADC_RIGHT_JUST & ADC_20_TAD,ADC_CH0 & ADC_INT_OFF & ADC_VREFPLUS_VDD &
ADC_VREFMINUS_VSS, 0b1011);
SetChanADC(ADC_CH0); /* Selects the pin used as i/p to the */
ConvertADC( ); /* start A/D conversion */
while(BusyADC( )); /* wait for completion */
/* Get results and...
PIC18F4520 4 ADC inputs