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)
First, I didn't understand what this interruption does.
Second, in the part "bpm = 60000 / beat;", I understood that it would be how many pulses he gave 60000 milliseconds divided by the amount of pulses he gave in that time, however in the part "beat = ADC_GetResult16 (0);"does it take the amount of pulses in 60000 milliseconds?I didn't get it right.
The interrupt is attached to the ADC. When the ADC completes a conversion, then the interrupt gets executed.
In the interrupt, the source of the interrupt is cleared and a flag (n=1) gets sent to the main() task to signal the ADC needs processing.
About 2.: Not sure. The ADC reads the instantaneous voltage of the sensor through a low-pass filter and then a Difference amp configuration(?). One would think you'd want the number of beats in 60000ms (60 seconds).
Maybe you should ask the author of the project.
Len "Engineering is an Art. The Art of Compromise."