- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I have a question regarding the heart sensor. I saw this topic on the internet:
I took thist project:
and saw the following code:
- 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.
Solved! Go to Solution.
- Labels:
-
PSoC Creator & Designer Software
- Tags:
- psoc 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RoFr,
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.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RoFr,
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.
"Engineering is an Art. The Art of Compromise."