| ??? 11/19/01 12:21 Read: times |
#16693 - RE: HeartBeat Detector |
A good idea is to do reverse-reverse-engineering :)) ...
We are so used to do reverse-engg (tailoring the problem to the solution) that we forget its not a bad idea to try proper engg once in a while :D ->Decide the freq range req'd ( 1 - 200 bpm) ->Decide the max accuracy (e.g. 1 bpm or 0.1 bpm) u may need ->Thus for a resolution of 1 bpm and range of 1-200 bpm, you can have 200 distinct values (so result can be an 8-bit value) ->diff between periods of 1 and 2 Hz = 0.5 sec = 500 msec ->diff between periods of 199 and 200 hz = 0.025 msec This u need a min time base with resolution of 0.025 msec and a max value of 500 msec that's one huge range!!! In this case I would suggest a timebase of 5-10 microsec If crystal freq=4 MHz (configure count timebase for 10 microsec pulses) ->for 200 Hz,count=500 =01F4h (16 bits) ->for 199 Hz,count=502 =01F6h (16 bits) ->for 1 Hz,count=10000=186a0h(32 bits) The difference between counts at higher frequencies is very narrow, so a smaller time base is preferable You can then either use look-up tables or 32-bit math to derive the result. However if your accuracy goes to 0.1 bpm or lower, you'll need much smaller timebases (order of .2 microsec) Kundi |
| Topic | Author | Date |
| HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
| RE: HeartBeat Detector | 01/01/70 00:00 | |
RE: HeartBeat Detector | 01/01/70 00:00 |



