View Single Post
  #28   Spotlight this post!  
Unread 12-03-2004, 19:28
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,868
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: quick question: TIMERS

Quote:
Originally Posted by Astronouth7303
The timer (1-4, actually) is initialized, and I have checked the enabled bit. The overflow variable (a char) is to slow it down. I send the long both over the terminal and through the dashboard. Both always say 0. The code looks like it should work, but doesn't. This is my ISR:
Code:
extern char TICK;
extern long TIME;
extern long AUTOCLOCK;
 
void Timer_1_Int_Handler(void)
{
TICK++;
if (TICK == 255)
{ TIME++; }
AUTOCLOCK++;
}
Fixed my earlier post. Thanks for noticing my error.

Your code looks file of course.
Have you tried displaying TICKS on the dashboard or terminal to see if it is also not getting incremented?
I have to run now, but I'll be back later and try to duplicate what you did in a test program.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle