Tema: Re: C: masyvo elementu perdavimas funkcijai
Autorius: Kantega
Data: 2011-02-28 21:09:52
Na, ir pilnumo delei:

void Wait(unsigned int ms){
Timer0=ms;
TCCR0B = 0x03; //start timer
while (!Timer0Ovf);
TCCR0B = 0x00; //stop timer
Timer0Ovf=0;
} 

ISR( TIMER0_OVF_vect) 
{
 TCNT0 = 0x64; //set count
  if (Timer0)
 {
    Timer0--;
    if (!Timer0) Timer0Ovf=1;
 }
}