|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#76
|
|||||
|
|||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
trivial note: I don't know whether you update your comments along the way, or once the build has stabilized, but I just wanted to mention that the ifi_frc.c file still has all the old reference to user_code.c in it's comments. Another thing I realized when I loaded this project was that your development environment and mine don't match, so it caused a hickup that may trip up first time users (me two years back ![]() You have the CC18 environment loaded under the MPLAB program folder, wheras mine is loaded under the c:/ root. I have no idea if this was a decision of mine, or the compiler default (i think so), or a consequence of me simply "upgrading" last year's install, but it means that when I load your project, two things happen: 1) MPLabs prompts me as to whether I want to keep my old CC18 compiler and Linker folders or use the ones in the project (I say keep the old one) 2) I get a linker error because MPLAB can't find the clib library. I need to go to Build-Options/Directories/Library, and set the path from c:/program files/mplab/cc18/lib to c:/cc18/lib My only reason for bringing this up is to determine what you, and the likely "critical mass" of users will be using. If CC18 should be loaded under MPLAB then I'll move mine. If this is contrary to the install default, then a "pre-install" readme would be a good idea to prevent (minimize) the initial confusion of new users. Thanks for all the time you put in. Phil. |
|
#77
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
|
|
#78
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
How about gyros? I noticed that your gyro code from last year uses both gyro.c/h and adc.c/h. I copied both of thme, and I've been fumbling for a while with integrating them and timers.c. I have not been able to do that yet, generating a red-light-of-doom in the process. Any ideas or advice? EDIT: Kevin, I believe I may have found a problem. Interrupts.h uses #define ENABLE_INT_# (for # being 1,2,...), while ifi_frc.c checks #ifdef ENABLE_INTR_# when checking for the ISR. That is an oversight, right? I searched the rest of the files and could not find another reference to ENABLE_INTR_#. Last edited by Guy Davidson : 02-01-2008 at 20:40. Reason: Found a problem |
|
#79
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
|
|
#80
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
I'll also port the ADC code too at some point (I need to find a better way of installing ISRs). I'll look into the INTR vs. INT issue this evening. It's probably just some knuckle-headedness on my part. Thanks for catching it. -Kevin |
|
#81
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
How do you get a version 8 MPLAB? The disks that we've received from FIRST were all version 7.20. IFIRobotics' web site still claims that they only work with 7.20. I didn't notice the MPLAB requirement and now I have a hybred system that won't compile my 2.4 code nore will it open Kevin's new workspace.
|
|
#82
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
It's free |
|
#83
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
I have had no issues running c18 v2.4 or v3.10 with MPLab v8. Your 2.4 code will not compile with c18 v3, and the MPLab v8 workspaces will not open in older versions of MPLab. If you want to be able to compile your 2.4 code, you'll need to copy the mcc18 folder from a computer with 2.4 installed, and change the header, linker, and library serch folders of you 2.4 projects to point to the 2.4 folders. |
|
#84
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Last year we got an updated adc code which only used 1 interrupt per sample, instead of 2. Is this already implemented in the new adc code? Also last year we had to use a new processor .h file for the encoders. I see the encoder work is in progress, so this will also disappear, I hope?
Isn't it new to be able to program for the disabled mode? Is there a hint there? |
|
#85
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Previously the same code would be run in the robot was Disabled or Enabled. The outputs were just disabled.
|
|
#86
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
My team, and probably several others (I know Chief Delphi does it or at least did it at one point), implemented mode determination to help prevent integrator wind up in PID loops. |
|
#87
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
|
|
#88
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Looking back at other posts, I see that now. It is nice for newer teams to see that they could initialize the gyro while siting and waiting for the match to begin. Now that is explicit. This newer code does look straight forward.
I won't get a chance to actually download this into a CD prior to kick off, but will spend my lunches studying it. Thanks to all of you already solving problems! |
|
#89
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
I see there is a .lkr file 18f8520, does that mean I can play with it on a VEX bot?
|
|
#90
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
No, you also need a version of the library for vex.
|
![]() |
| 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 |