Thread: Delay Function
View Single Post
  #2   Spotlight this post!  
Unread 21-02-2007, 09:15
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Re: Delay Function

maybe somthing like this..
Code:
void delay(unsigned int seconds)
{
   unsigned int current = 0;
   while (current < (seconds * 1000) / 26.4) // Seconds * 1000 to get milliseconds and then / 26.4 millisecond loop
   {
      getdata(); // forget what parameter getdata takes
      current++;
      putdata(); // forget what parameter putdata takes..
   }
}
I have no idea if that will work but you can try it..