![]() |
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
Re: New C18 3.0+ Compatible FRC Code
Kevin,
Thanks - we already had #include <adc.h>, it seemed to come like that. Our mcc18 adc.h file actually did not have a definition for ADC_15ANA - it had 0-14 and 16. Assuming the intent is to set all the pins to analog, I changed "ifi_analog_channels" to "ADC_16ANA" if it helps. In our file, we had Code:
#define ADC_14ANA 0b11110001 // analog: AN0->13 digital: AN14->15Thanks again, James |
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
Re: New C18 3.0+ Compatible FRC Code
Using new code with Eclipse? How to make the correct makefile? Help?
|
Re: New C18 3.0+ Compatible FRC Code
Kevin,
I am currently working with the ADC and Gyro code for the mcc18 v3, using MPLAB IDE v8.0. I realized that I had v2.4 of the compiler, so I downloaded and ran the v3.1 updater. Now, when I compile, the linker tells me I have the wrong (out of date) COFF file format for the object files (*.o). Any ideas? Here is the error: Code:
Error - Coff file format for 'C:\Documents and Settings\Ethan\My Documents\Programming\FIRST\Code\ifi_frc_gyro\adc.o' is out of date. |
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
Re: New C18 3.0+ Compatible FRC Code
I am planning on using the custom pwm.c/h code to generate the two pwm signals at 100Hz. I realized that unless I am also providing command and mointoring the system at 100Hz, it won't gain me anything (i.e. if I were to generate pwm commands in the 38Hz loop and update the commands at 100Hz, I don't think I'd gain anything). Hence I am also planning to update encoder-based pid loops at a rate of 100Hz. Not only this will give me a constant interval between updates, making my velocity estimates more reliable, it should make use of the faster update rate by generating commands at that rate.
Will doing something like that impact the performance of the the pwm functions? My PID loop code is not much more than a bunch of logical tests and integer multiplications. I am wondering if I should be okay if I call the PID code from within the Timer ISR that generates the pwm signal, or am I risking a significant drop in performance. Thanks (and I hope my question is worded clearly enough - if not, please let me know, and I'll try to reword it) |
Re: New C18 3.0+ Compatible FRC Code
This is related to the Beta code, but with default code compiled with MPLAB 8.00 and c18 2.40 I get a similar error to Etahn Reesor:
Quote:
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
I keep getting a link error Error - could not find definition of symbol 'Int_6_ISR' in file 'C:\dev\ifi_frc_gyro\ifi_frc.o'. even when I enabled interrupts 3-6 in ifi_frc.h Thoughts? |
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
Re: New C18 3.0+ Compatible FRC Code
Quote:
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
Code:
if (pwm03 > 127)Just as easily, you could test for the actual value. Code:
if (pwm03 == 255) |
Re: New C18 3.0+ Compatible FRC Code
It has been explained how to add encoders to the gyro code, how about the reverse?
|
| All times are GMT -5. The time now is 14:27. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi