//############################################################################################################################################################################################################# #include "SYSTEMCustom.h" //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- void System_InitSysTick(void) { SystemSystickCounter=0; TCNT0=0xFF-250; // 1 ms TCCR0B=0; // no clock TIMSK0=0; // Overflow Interrupt Disable } //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ISR(TIMER0_OVF_vect) // 1ms timer0 interrupt { TCNT0=0xFF-250; // 1 ms if (SystemSystickCounter==0xFFFFFFFF) SystemSystickCounter=0; else SystemSystickCounter++; } //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- void System_SystickTimerStart(void) { SystemSystickCounter=0; TCNT0=0xFF-250; // 1 ms TCCR0B=3; // clkI/O/64 (from prescaller) TIMSK0=1<