![]() |
Need interupts help, and another question...
Im having a problem getting the interupts working on the FRC. My sensor group has been working all the work period on seperate codes for the trackers, line sensors and encoders using the edubot. This week I ported everything for use on the FRC, but Im having a big problem getting the interupts to work. First, I just used the initialization routines that I made for the edubot, and worked on the edubot, in the FRC code but it didnt work. I tried putting the code out of kevin(.org)'s interupts example (they were almost identical) and still nothing. I tried using the code in first's timers guide but that was also identical. Im having this problems on timers 1,2 and interupts 1-6. Ive tried dissableing all interupts exept for one, but no luck. This is the code im using (as an example) to initialize the interupts for the drive encoders:
Code:
void Initialize_Encoders(void) Code:
void Initialize_Timer_2(void) Im calling the inits from User_Initialization like im supposed to. My other question is if we can exclude some parts of firsts code, like the printf library since they take up a large chunk of the program flash memory and I want to use that space for other stuff. Thanks, Kevin Karan Team 174 Arctic Warriors Programmer |
Re: Need interupts help, and another question...
As for the first part, ask Kevin.
As for the second part, I think that printf is the only one you can exclude, but only if you aren't using printf() anywhere. And this year's mem is huge, so if you filled it already, tell us! |
Re: Need interupts help, and another question...
Quote:
And I did fill it up :D, Its a mix of a heavily modified tracker, a math library, and my drive system that (hopefully) makes accurate speed/power ajustments relitive to the maximum speed of the bot as seen with the encoders. Thanks! |
Re: Need interupts help, and another question...
Quote:
Quote:
|
Re: Need interupts help, and another question...
Quote:
|
Re: Need interupts help, and another question...
Quote:
-Kevin |
Re: Need interupts help, and another question...
If you're having problems with interrupts, Daniel Katanski of team 240 wrote an amazingly helpful whitepaper on the topic - I recommend you read the whole thing, as not only it explains in details how to use interrupts and timers, but it also gives some neat programming tricks here and there. I just began using interrupts the other day (after sitting down for a day with that whitepaper and pouring through each line of the default code), so I think other people on this board are going to be more helpful than me in terms of debugging. However, I do want to include this part from the whitepaper:
Quote:
Although it'll take quite a bit of work to incorporate into your code if you built something off the default IFI code, something that you might also wish to check out is Kevin's heavily annotated interrupt and timer template code. Kevin - you did a great job with your comments on that one - they helped me a lot. |
Re: Need interupts help, and another question...
thanks everyone, esp SuperDanman and Kevin Watson. I dont have time on the frc again untill tomarrow, so Im going to have to wait to test this untill then, but what I did was strip some of the excess calories from Kevin Watson's interupt template (most of the printf library and some of the leftover first functions in user_routines) then put everything into that. Let you know how it goes.
Thanks for pointing out that whitepaper SuperDanman, helped alot. |
| All times are GMT -5. The time now is 13:40. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi