43.6.1.1 Channel Context Configuration
The following steps are used to configure channel context via the ADCTX register:
- Write the desired context number into the CTX bits; hardware automatically clears CTXSW.
- Configure all desired ADC registers (e.g., ADCON1, ADCON2, etc.).
- Repeat steps 1 and 2 until all channel contexts have been configured.
0
), Context 1 is in view.Once the context number has been written into the CTX bits, the selected channel context is available for software access. After each ADC register is configured, the register value is copied into the associated context register.
Data can also be read from the ADC’s data registers (ADFLTR, ADRES, etc.) using the same steps above. Rather than configuring the desired ADC registers in step 2, user software can instead read data from the desired data registers.