2015-12-03 04:04 AM
Hi all,
I am doing a project to count heart rates. My heart rate device gives a digital output, which I plan to feed into PC2 pin of my STM32f1. My problem though, is calculating the heart rate using this digital input. Here is what I need to do: 1. I need to create a 5 second time period, in which the input is counted when high. 2. I need to then multiply the count with 12 after this 5 second time period to display on the LCD. 3. I will need the 5 second time period to start again, once it finishes. I do know I have to use timers and interrupts to do this, but unfortunately I am using the STM32 for the first time. If someone could help me with a sample code, I would be obliged. Thank in advance.2015-12-03 04:24 AM
[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Conting%20pulses%20over%20a%20certain%20time%20period&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx¤tviews=27]Other thread