This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Just Idea: how count the heartbeat in the Msp430f5438a board?



Hello everybody, 

i woud count the heartbeat. I have a sensor that send to Msp430 board the signal when beat the Heart. Here is my Idea --> I get the signal as Analog and change it to Digital, when it is greater than for Example 1.5V than i activate the TimerA. By next Beat i can calculate the different time between two Beat. It problem is, that the Msp Board should sample the Sensor signal always. I would know, can i write my programm better without sample the signal always?

Second solution --> Can i active any Timer-Capture on MSP430 board by give the Voltage on the Pin connected to the Timer? I mean, change any Pin connected to Timer as Input and give the Sensor Signal to the Pin so activate the timer. I don't know, whether function the second solution.

Thank's

  • The 5438(A) does nto have a comparator. So if you don't want to continuously convert and compare the input signal, the othe rway would be to use an external OpAmp. Apply the 'trigger' voltage to its positive input and the analog signal to the negative and the output will swing to GND or VCC depending on whether the signal is above or below the 'reference'. Then you can link this outpu tto a pin of port 1 or port 2 and get an interrupt when the OpAmp output changes. Or tie it to a timer CCR unit input and you not only get an interrupt, but also the frozen timer count at the moment of this interrupt. So the difference between two interrupts can be directly converted into a delay (and therefore frequency)

**Attention** This is a public forum