Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
Hello !! Thanx everyone to solve my previous query so quickly.. 🙂
i am facing a simple problem that i have made my sub modules of voltage measurment, voltage averager, probe logic and frequency measurment individually and everything is working fine !! But when i combine them all in main module using switch case, the frequency measurment part doesn't work.. any idea why it is creating such problems ?? i have attached my code along with my post..
yup.. i think it is the problem i am facing.. but where should i initialize the timer interrupt routine ?? the code is going upto printing the frequency statement on lcd.. but i think it is not going further.. any help ??
Initialize the interrupt and the Timer-Module once, then (if you prefer) you can disable them with the appropiate API-Call.
In the corresponding procedure you can enable/restart them and(again if you prefer) disable them.
The right place would be the function (I hope you already took it out of the switch-block) where you measure frequency.
I (normally) put an isolated function like measuring the frequency into a complete different .c-file and make a .h interface. Later when programming a completely different project I have the opportunity to re-use that piece of software.