View Single Post
  #1   Spotlight this post!  
Unread 16-03-2007, 00:18
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?

Don't be fooled... there is a HUGE difference!

Picture this... the IFI main program loop polls for a bit saying that a new packet of data has been passed to the user processor from the master. Then, the IFI code calls Process_Data_From_Master_uP(). The whole time you are in this routine, you wont be polling for your flag... so that can mean up to many milliseconds of delay! Definitely not acceptible error for running a PID, calclating RPM, timing pulses, etc.

The interrupts will always be more (key word: more) exact than polling. While it does take a few microseconds to get into the interrupt, this is surely better than a few MILLIseconds. Of course there's a way around even the delay of interrupts... but we'll save CCP's for some time when I can talk with pad and pen and not have to type it all out.

Do you know how to use interrupts? Its kind of fun... but then again I think a lot of things are fun others dont . Kidding aside, if you need some tips/tricks/hints/explanations i'll give em.

Sometime i'm going to write a whitepaper on all the internal peripherals inside the processor... should be helpful. Just have to sit down and do it... ugh.

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