pic mikroc heart rate monitor question

Thread Starter

Hassan Abu al rub

Joined Feb 10, 2019
11
if (TMR1IF_bit){
TMR1IF_bit = 0;

counter++;
if(counter==4){heartplus*60;counter=0; heartplus=0;}


TMR1H = 0x0B; //every 250 ms
TMR1L = 0xDC;

}

if (TMR0IF_bit){
TMR0IF_BIT=0;
TMR0L=255;
heartplus++;

}}

_____________________________________________________________________
_____________________________________________________________________

i have heart rate module output is plus 5 volt when i hold sensor with two hand give puls

i need to do some calculation to make simple project

by timer one i do 250 ms and some delay if(counter==4) to give me one second

also time 0 set as counter to count plus

the number i get BPS * 60 to give BPM

but calculation and some thing need to add to my simple code

can any one advice
 

upand_at_them

Joined May 15, 2010
762
For one thing, when counter == 4 you are doing this: "heartplus*60", which means nothing since it isn't assigned to a variable. And in the same block of code you are setting heartplus = 0...Is that what you intended to do?
 
Top