|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
THIS IS .MCP FILES ONLY! NO CODE! EDIT: Are you using c18 v3+ to compile the v2.4 code? |
|
#2
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
i believe i am. you download that from the microchip website? i have...
V 3.1 |
|
#3
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
If you are using v3.1 you need to download the verison of the code for c18 v3+. It is listed on the first post of this thread.
Last edited by EHaskins : 07-01-2008 at 16:20. Reason: typo |
|
#4
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
i did download that one.
EDIT: oops... i didn't! Ok, well which of the various links is it? is it "the snapshot of the latest build" |
|
#5
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
The library file reference in the error you posted is the v2.4 version.(you can tell by the "_24" ending of the library file and the project directory) Unless kevin included the wrong library you accidentally grabed the wrong file.
The first three links are 3+. The other two are v2.4. |
|
#6
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Kevin,
In the gyro.h file there are definitions for several different gyros. However, the new KoP gyro is not one of them. Do you think you will be able to add a set of constants for it next time you rebuild? Thanks. |
|
#7
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
I am currently in the process of testing the old configure.py makefile with this new code. Has anybody had success?
I use a mac, and seriously do not want to try and update mplab in vmware.. painful memories.. |
|
#8
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Our mistake here is probably very silly and obvious, but the solution eludes us nevertheless.
We're trying to get the gryo and accelerometer working, but we get a build error when we try to use the Get_Analog_Value function. Code:
gyro = Get_Analog_Value(rc_ana_in16); Code:
Error [1105] symbol 'ADC_CH15' has not been defined |
|
#9
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
The analog inputs are not instantaneous. You have to start them, then wait a certain amount of time and then read them. The code in adc.c will do that for you and uses a timer to wait. Calls to Get_ADC_Result will simply fetch the result that the library has already captured for you. The function Get_Analog_value does the start/wait/read operation in-place and takes longer and consumes valuable cycles that could be put to better use doing something else. |
|
#10
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Kevin, I have question about adc.c.
In Timer_4_ISR you have two for loops that cover the same range of indexes. Code:
if(samples >= adc_samples_per_update)
{
// update the ADC result array
for(i=0; i < num_adc_channels; i++)
{
adc_result[i] = (long)(accum[i] >> adc_result_divisor);
}
// reset the sample accumulator(s) to zero
for(i=0; i < num_adc_channels; i++)
{
accum[i] = 0L;
}
// signal that a fresh sample set is available
adc_update_count++;
// start a fresh sample set
samples = 0;
}
Code:
if(samples >= adc_samples_per_update)
{
// update the ADC result array
for(i=0; i < num_adc_channels; i++)
{
adc_result[i] = (long)(accum[i] >> adc_result_divisor);
// reset the sample accumulator to zero
accum[i] = 0L;
}
// signal that a fresh sample set is available
adc_update_count++;
// start a fresh sample set
samples = 0;
}
|
|
#11
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
|
#12
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
|
#13
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Kevin
still getting wierd compile errors..... Clean: Done. Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "autonomous.c" -fo="autonomous.o" -k -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- C:\mcc18\h\stdio.h:26:Error [1178] illegal declaration of object of type void C:\mcc18\h\stdio.h:27:Error [1178] illegal declaration of object of type void C:\mcc18\h\stdio.h:31:Error [1178] illegal declaration of object of type void Halting build on first failure as requested. BUILD FAILED: Sun Jan 13 18:44:53 2008 ???????? |
|
#14
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
|
#15
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
It's the ifi_frc_encoder_beta oput of the box....using the 3.10 compiler and 8.0 MpLab
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Does the camera code suits to all versions of MPLAB and C18? | razer | Programming | 3 | 04-01-2007 14:50 |
| Trying to follow C18 interrupt context code... | dcbrown | Programming | 5 | 21-12-2006 09:01 |
| Error w/ FRC code | JamesBrown | Programming | 2 | 08-01-2005 16:17 |
| Programming code Fix FRC | Ferazel2001 | Programming | 6 | 08-02-2004 02:46 |
| FRC default code | hedgehogger | Programming | 2 | 21-01-2004 18:41 |