Hello everyong,
I inherited a project using a PIC18F46K80. I need to set up four channels of A/D. I am using the xc8 compiler. In the library there is a function called "OpenADC()" I have looked at all the examples I can find and they are either for one channel or written in assembly. Here's my question;
In the second parameter, do I have to list all ports I intend to use.
example;
OpenADC(ADC_FOSC_64 & ADC_RIGHT_JUST & ADC_6_TAD,
ADC_CH0 & ADC_INT_OFF & ADC_VREFPLUS_VDD & ADC_VREFMINUS_VSS, etc.
would I use ADC_CH0 & ADC_CH1 & ADC_CH2 & ADC_CH3 ?
Thanks in advance for helping an old newbie!
Paul
I inherited a project using a PIC18F46K80. I need to set up four channels of A/D. I am using the xc8 compiler. In the library there is a function called "OpenADC()" I have looked at all the examples I can find and they are either for one channel or written in assembly. Here's my question;
In the second parameter, do I have to list all ports I intend to use.
example;
OpenADC(ADC_FOSC_64 & ADC_RIGHT_JUST & ADC_6_TAD,
ADC_CH0 & ADC_INT_OFF & ADC_VREFPLUS_VDD & ADC_VREFMINUS_VSS, etc.
would I use ADC_CH0 & ADC_CH1 & ADC_CH2 & ADC_CH3 ?
Thanks in advance for helping an old newbie!
Paul