View Single Post
  #11   Spotlight this post!  
Unread 16-03-2007, 07:43
Spencer E.'s Avatar
Spencer E. Spencer E. is offline
Android junkie
FRC #1305 (NNSRI Ice3 (cubed))
Team Role: Alumni
 
Join Date: Apr 2005
Rookie Year: 2004
Location: Ontario, Canada
Posts: 91
Spencer E. has a spectacular aura aboutSpencer E. has a spectacular aura about
Send a message via MSN to Spencer E.
Re: Anyone actually using hardware timers?

All I need the timer for is moving the arm, like I've said before, but I would like it to be exact so I guess I'll work with the interrupt then, thanks for the clarification. I'm not exactly an expert when it comes to writing interrupt code but I can do the bare minimum needed. I've learned from Kevin Watson's interrupt codes how they should be handled and everything. IFI mentions in their white paper that what I should do is get out of the interrupt as fast as possible and just set a variable inside the interrupt and handle it later. I find this kind of weird so what I'm planning on doing is instead of doing it their way, just incrementing the variable I have for keeping the seconds timed and incrementing it inside the interrupt. I don't see a problem with it, is there anything I should know about this?

EDIT: When I mention incrementing the seconds in the interrupt, I mean after the initial 25ms and 100ms interrupts