|
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
|