/Designs/Measuring_instruments/AWS01A/SW/PIC16F887/main.c |
---|
33,7 → 33,7 |
void TIMER1_isr(void) |
{ |
// wind speed calculation 32.768 kHz crystal on timer1 oscilator expected. |
anemo = ((timer0_overflow_count * 0xFF) + get_timer0())/(32768.0/0xFFFF); // pulses per second calculation |
anemo = ((timer0_overflow_count * 0xFF) + get_timer0())/(0xFFFF/32768.0); // pulses per second calculation |
anemo = anemo / 10.5; // frequency divided by anemomether constant. |
timer0_overflow_count=0; |