View Single Post
  #13   Spotlight this post!  
Unread 09-03-2004, 01:54
10intheCrunch's Avatar
10intheCrunch 10intheCrunch is offline
Who's John V-Neun?
AKA: Alex Baxter
None #0254 (Cheesy Poofs)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: San Jose, CA
Posts: 129
10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough
Send a message via AIM to 10intheCrunch
Re: Do you write functions for your code?

In terms of organization, we also split most of our code into different files. We have a lot of code for the arms that would only get more confusing if it were thrown in with the general usage code (same with the drive code), especially because the arm is only updated on interrupts (5 and 10 times a second).

It's very nice in terms of development, because everything is seperated, we know where it all is, and we can work on different parts of the code at the same time. If we are having problems, it is very easy to take part or all of the file out of the system while we test other things.

As long as you don't go overboard, I think the chip should be fine handling multiple function calls--the power is enough that you *are* going to get through an entire loop in less than the "required" time when new data comes in/interrupt is fired. I think at the very maximum we could have five nested functions (main loop, function called, interrupt handler, arm code, arm position code), and there have been no problems as yet.
__________________
~Alex Baxter
Programming, Arms operation, Team 254