View Single Post
  #23   Spotlight this post!  
Unread 12-03-2004, 13:49
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: quick question: TIMERS

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++;
}
Also, have "Clock > 150" first and "Clock > 0" last (Descending order), I found this out in some EDU trials. "Clock > 0" will be true if "Clock > 150", so if >0 is before >150, >150 never happens because >0 does.