void TimerFunction()
{
TIMSK=(1<<TOIE0);
TCNT0=0x00;
TCCR0 |= (0<<CS02) | (1<<CS00) | (0<<CS01);
}
//##############################################################################
ISR(TIMER0_OVF_vect)
{
// process the timer0 overflow here
countClock ++;
count++;
delay++;
//some extra code
}
then
void main()
{
//someCode
TimerFunction();
}
but it doesnt work for me ,so is that the right way to start the timer 0 and its interrupt service routine ??