|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#13
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
1) Add adc.c/.h and gyro.c/.h to your project directory. 2) Add adc.c/.h and gyro.c/.h to your MPLAB project. 3) Add #include "adc.h" and #include "gyro.h" at the top of teleop.c. 4) Add a call to Initialize_ADC() and Initialize_Gyro() in teleop.c/Initialization(). 5) If needed, add #include gyro.h to the top of autonomous.c and/or disabled.c 6) Where needed, add a call to Process_Gyro_Data() in the *_spin() functions. 7) Enable the timer 4 ISR at the top of ifi_frc.h. 8) Make sure timer 4 is disabled at the top of timers.h. 9) Add calibration code somewhere like disabled.c/Disabled() (this requires that you use a mode dongle to emulate the field controller, which will put you in disabled mode for a period of time before transitioning to autonomous mode). 10) Do anything else I forgot to mention here <grin>. 11) Compile, test, calibrate your gyro (see gyro.h). -Kevin |
| 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 |