
uint8_t out, ffkey;
volatile unsigned long mil = 0 ;
extern volatile uint8_t measurement_done_touch;
uint8_t uid[10] = {0};  // uids are maximum of 10 bytes long.
volatile uint16_t BuzzTime;






ISR(TIMER3_COMPA_vect){  // 1mS

	u4_RxExtTimer();

  	static int _millisecondi = 0;
	mil++; 
  	if ( ++_millisecondi >= 1000 ) {
    	_millisecondi = 0;
    	forsec++;
  	}
}
void delay( int i )	{
	unsigned long _millis = millis();
	while(millis()-_millis<i);
}


unsigned long millis(){
	unsigned long m;
	uint8_t oldSREG = SREG;
	// disable interrupts while we read timer0_millis or we might get an
	// inconsistent value (e.g. in the middle of a write to timer0_millis)
	cli();
	m = mil;
	SREG = oldSREG;
	return m;
}
