Quote:
Originally Posted by The Vrooman
We have the gyro working with the default gyro code, so we know that it can't be an electrical problem.
We took the gyro.c, gyro.h, adc.c, and adc.h from the defualt code so we know that they aren't the problem either.
So here is our user_rountines_fast.c.
Please fix it.
If you can't find anything wrong with it do you have any ideas what other files would make the gyro not work.
Thanks,
Team 1137
|
You have a piece of redundant code that clears the encoder interrupt flags before the encoder code executes. See my comment in user_routines_fast.c. In user_routines_fast_rkw.c I've fixed the problem and re-arranged the ISRs to be more efficient. As I don't know if you're using both serial ports and the number of encoders, you should delete any code for features you're not using. Also, keep the ADC sample rate as low as you can and keep the encoder-generated interrupts as low as possible (a few hundred per second is fine).
-Kevin