
12-01-2008, 13:22
|
 |
La Caņada High School
 FRC #2429
Team Role: Mentor
|
|
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
|
|
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
Originally Posted by NetElemental
Kevin, First of all thanks, this will be a great help.
Our team has a 2005 robot controller and operator interface mounted to a board for testing purposes when it is not practical to use the current robot controller (e.g., the current controller is on the robot, and the robot is being built or modified). We swapped out the libraries and linker files for the ones corresponding to the PIC18F8520, changed the target to the 8520, and tried to compile. We got this error(in your ifi_frc_gyro code, if it's relevant):
Code:
C:\Users\NetElemental\Documents\Code\ifi_frc_gyro\ifi_code.c:33:Error [1105] symbol 'ifi_analog_channels' has not been defined
inaccuracy
The line code corresponds to
Code:
29 #if defined(__18F8722)
30 OpenADC( ADC_FOSC_RC & ADC_RIGHT_JUST & ADC_0_TAD,
31 ADC_channel & ADC_INT_OFF & ADC_VREFPLUS_VDD & ADC_VREFMINUS_VSS,15);
32 #else
33 OpenADC( ADC_FOSC_RC & ADC_RIGHT_JUST & ifi_analog_channels,
34 ADC_channel & ADC_INT_OFF & ADC_VREFPLUS_VDD & ADC_VREFMINUS_VSS );
35 #endif
Any ideas? We couldn't find ifi_analog_channels in either .lib file. What would your suggestion be?
Thanks,
James
|
Replace "ifi_analog_channels" with "ADC_15ANA" and it should compile.
-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
|