Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Unable to resolve ADC_CH0 (http://www.chiefdelphi.com/forums/showthread.php?t=63130)

p_a_3 02-02-2008 16:14

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

Kevin Watson 02-02-2008 16:43

Re: Unable to resolve ADC_CH0
 
Quote:

Originally Posted by p_a_3 (Post 690822)
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

p_a_3 02-02-2008 18:06

Re: Unable to resolve ADC_CH0
 
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

Kevin Watson 02-02-2008 20:26

Re: Unable to resolve ADC_CH0
 
Quote:

Originally Posted by p_a_3 (Post 690893)
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

Kevin Watson 03-02-2008 01:42

Re: Unable to resolve ADC_CH0
 
Quote:

Originally Posted by p_a_3 (Post 690822)
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

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


All times are GMT -5. The time now is 13:21.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi