View Single Post
  #4   Spotlight this post!  
Unread 16-03-2007, 21:25
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: Anyone actually using hardware timers?

A good tip... make interrupt code as efficient as possible... but often times you can't set a flag and handle it later, since this would be the same as just polling for the interrupt flag in the first place.

If you need to do something longer-time in the routine, but avoid this like the plague if you can, I just suggest that you use a digital I/O pin as a flag pin for how long your interrupt is running, and just time the pulse on your oscilloscope.

Another suggestion, just not a pin (ex rc_dig_out18 = !rc_dig_out18; ) in the Process_Data_From_Local_IO() routine, and wherever you don't see the constant frequency of the main processor loop you know the processor is busy, a good way to guage your % loading on your processor.

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