// in loop to select mux chan and get a/d result
AMux_1_Select(uint8 chan); // Chan # is 0 - 3 in your case
ADC_GetResult16(void); // This is for continuous conversion mode ADC. You might want a little
// delay after mux change to allow for settling. Or set ADC to one shot mode,
// and issue start command in loop, then test for finished.
channel = 0;
channel = ( channel < 3 ) ? channel + 1 : 0;
Users browsing this forum: Bing [Bot] and 1 guest