View Single Post
  #5   Spotlight this post!  
Unread 27-02-2007, 08:03
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: How do I know if I'm overloading the RC program?

When you say you used all 6 interrupts, did you put encoders on all six of these pins? Make sure you watch your interrupt rates...

If you're questioning how long it takes a routine to run you can always set a pin in the beginning then clear it at the end, just use a scope to time it. Or, if you want to see how often your procesor is idle, just toggle a pin in process_data_from_local_IO() and watch how much time you get a constant frequency compared to how long you have constant up/down states (this would mean your doing something else, not toggling your pin).

I had an issue with encoders having too high an interrupt rate myself, so we switched to a different encoding technology. Remember the ISR that the compiler puts in also takes time, can't quite remember how long.

Remember that floating point operations use the same two registers, so if you interrupt a floating point operation and start doing one in the interrupt, you'll get junk data when you return from the interrupt. Stack overflows on rare occasion will not cause the processor to crash, however usually this will cause the 'code error' light to flash.

If you need anything I havent listed here just give me a pm/email.

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08