Re: Harmony v2 and ADC channels
1. MHC in Hv206 will corrupt ADC settings, so each time you open MHC check all the ADC settings. When you generate a working adc file then set it read only so not overwritten when do an MHC generate for something else.
Especially Class 2 settings, but other items lost as well.
2. Check that other ADC channels (MHC missed some code).
DRV_ADC0_Open();//Enable ADC Driver *Channels* as Setup in Harmony
// In MHCv2052 after ADC Diagram ensure Manually set Class2 channels if 6 or 7 used, else AN10/AN11 may be set wrong
3. Patch for MHCv2060: Disable this block of generated Code in drv_adc_static.c at about lines 293-306:
///////* Since configuration of analog inputs (dedicated and alternate) for dedicated ADC channel */
///////* is done via selection of dedicated channel only, here, the analog input for a dedicated */
///////* ADC channel number is fixed */
////// if (DEVADC7 != 0xFFFFFFFF)
////// PLIB_ADCHS_ChannelConfigurationSet(DRV_ADC_ID_1, ADCHS_CHANNEL_7, DEVADC7);
4. Attached is my adc_static.c with patches (for reference)
5. Attached my ADC settings (Sorry but had to drop resolution crazy to fit in ancient forum limit).