MiTom.99923
uint64_t time_over_flow = 0;
ISR(TIMER1_COMPA_vect){
/* Kiem tra da dung yeu cau update chua */
time_over_flow ++;
}
void pulse_messurrent_init(void)
{
cli();//stop interrupts
//set timer1 interrupt
TCCR1A = 0;// set entire TCCR1A register to 0
TCCR1B = 0;// same for TCCR1B
TCNT1 = 0;//initialize counter value to 0
// set compare match register for increments
OCR1A = 19999; // = (16*10^6) / (1*1) - 1 (must be