Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   ADC_CHO not compiling in Kevin's code (http://www.chiefdelphi.com/forums/showthread.php?t=63998)

Hazmatt 13-02-2008 19:10

ADC_CHO not compiling in Kevin's code
 
We're trying to compile with Kevin's code using an analog input and printing it to the screen but when we tried to compile we got a code error saying that "symbol 'ADC_CH0' has not been defined"

arm_pos = Get_Analog_Value(ADC_CH0);
printf ("arm position = %d\r\n",arm_pos);

psy_wombats 13-02-2008 19:39

Re: ADC_CHO not compiling in Kevin's code
 
Are you calling the old function for getting analog code? I believe Kevin Watson wrote replacement code for the ADC, using Get_ADC_Result(). Try using his ADC stuff, or else search the forums. There have been plenty of topics like this.

Kevin Watson 13-02-2008 20:29

Re: ADC_CHO not compiling in Kevin's code
 
Quote:

Originally Posted by Hazmatt (Post 698325)
We're trying to compile with Kevin's code using an analog input and printing it to the screen but when we tried to compile we got a code error saying that "symbol 'ADC_CH0' has not been defined"

arm_pos = Get_Analog_Value(ADC_CH0);
printf ("arm position = %d\r\n",arm_pos);

You just use a number from 1 to 16. Quick_ADC() works the same way.

-Kevin


All times are GMT -5. The time now is 00:58.

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