Unable to resolve ADC_CH0

I have been unable to locate this. In ifi_frc.h is

#define rc_ana_in01 ADC_CH0

Can someone please tell me where it is defined?

Thanks

If you’re using the legacy IFI code in ifi_code.c, you should use the values found in mcc18\h\adc.h (e.g., ADC_CH0, ADC_CH1, etc).

If you’re using my code, you just pass in a number corresponding to the channel (e.g., Get_ADC_Result(1)).

-Kevin

Please excuse my confusion here.

The base code we used was located in ifi_frc_sensor_30

The reference to ADC_CH0 was in ifi_frc.h of that project. I suspected that these defines were values 0, 1, etc. When I looked at an old mcc18\h\adc.h I found

#define ADC_CH0 0b10000111 // Channel 0

Should I use these values or simple integers?

Thanks,
Paul Alexander

I’ll have a look at it this evening…

-Kevin

Sorry about the confusion. I’ve written replacement code that has the same functionality as the old IFI code. I’m not sure how I’ll incorporate it yet, but you can download it here and drop it into your project.

-Kevin