Design a software system that measures frequency with a reso

Design a software system that measures frequency with a resolution of 1 Hz using interrupt synchronization. The signal is connected to PT1. OC5 is used to create a periodic interrupt. Assume the E clock period is 250 ns. If the frequency is faster then 65535 Hz, set the measurement to 65535. Measure it over and over, placing the newest measurement into unsigned short Freq; // units 1 Hz, range 0 to 65535 Hz

Solution

void interrupt measure_frequency rti_isr(void) {
CRGFLG = 0x80; // Clear flag value
if (frequencyCount == N) {   
takeMeasurement();
frequencyCount = 0;
} else   
frequencyCount++;
}

Design a software system that measures frequency with a resolution of 1 Hz using interrupt synchronization. The signal is connected to PT1. OC5 is used to creat

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site