Channel Grouping

Channel grouping allows multiple, simultaneous input connections to the ADC. The ADC Channel Group Selection (ADCGxp, x = Group number, p = PORT) registers are used to enable each I/O port’s analog input channels. A channel group includes all enabled inputs from each of the group’s selection registers. All of the group’s input signals are wire-OR’d into a single ADC positive input channel, ADCGx, which can be selected by the ADC Positive Input Channel Selection (PCH) bits.

The example below illustrates the configuration of one channel group.

ADC Group Example (20-Pin Device)

  ADCG1A = 0x05;     // Include ANA0 and ANA2 in Group 1
  ADCG1B = 0xB0;     // Include ANB4, ANB6, and ANB7 in Group 1
  ADCG1C = 0x0A;     // Include ANC1 and ANC3 in Group 1