资源简介
基于stm32的血压算法,精度还可以,需要的话可以直接移植使用,方便大家。
代码片段和文件信息
#include
#include “stdint.h“
#define seg_a 0x01
#define seg_b 0x02
#define seg_c 0x10
#define seg_d 0x04
#define seg_e 0x80
#define seg_f 0x20
#define seg_g 0x08
#define seg_h 0x40
#define NUM_0 (seg_a | seg_b | seg_c | seg_d | seg_e | seg_f)
#define NUM_1 (seg_b | seg_c)
#define NUM_2 (seg_a | seg_b | seg_d | seg_e | seg_g)
#define NUM_3 (seg_a | seg_b | seg_c | seg_d | seg_g)
#define NUM_4 (seg_b | seg_c | seg_f | seg_g)
#define NUM_5 (seg_a | seg_c | seg_d | seg_f | seg_g)
#define NUM_6 (seg_a | seg_c | seg_d | seg_e | seg_f | seg_g)
#define NUM_7 (seg_a | seg_b | seg_c)
#define NUM_8 (seg_a | seg_b | seg_c | seg_d | seg_e | seg_f | seg_g)
#define NUM_9 (seg_a | seg_b | seg_c | seg_d | seg_f | seg_g)
#define NUM_A (seg_a | seg_b | seg_c | seg_e | seg_f | seg_g)
#define NUM_B (seg_c | seg_d | seg_e | seg_f | seg_g)
#define NUM_C (seg_a | seg_d | seg_e | seg_f)
#define NUM_D (seg_b | seg_c | seg_d | seg_e | seg_g)
#define NUM_E (seg_a | seg_d | seg_e | seg_f | seg_g)
#define NUM_F (seg_a | seg_e | seg_f | seg_g)
const unsigned char hex_table[] =
{
0xEB /* “0“ LCD segments a+b+c+d+e+f */
0x60 /* “1“ */
0xC7 /* “2“ */
0xE5 /* “3“ */
0x6C /* “4“ */
0xAD /* “5“ */
0xAF /* “6“ */
0xE0 /* “7“ */
0xEF /* “8“ */
0xED /* “9“ */
// NUM_0NUM_1NUM_2NUM_3NUM_4NUM_5NUM_6NUM_7
// NUM_8NUM_9NUM_ANUM_BNUM_CNUM_DNUM_ENUM_F
};
int32_t mul16(register int16_t x register int16_t y);
//FIR filter coefficient for
//removing 50/60Hz and 100/120Hz
//from the signals
#if 0
static const int16_t coeffs[9] =
{
5225
5175
7255
9453
11595
13507
15016
15983
16315
};
#else
static const int16_t coeffs[12] =
{
688
1283
2316
3709
5439
7431
9561
11666
13563
15074
16047
16384
};
#endif
//#define FIRST_STAGE_TARGET_HIGH 3900
//#define FIRST_STAGE_TARGET_LOW 3600
//#define FIRST_STAGE_TARGET_HIGH_FINE 4096
//#define FIRST_STAGE_TARGET_LOW_FINE 3500
#define FIRST_STAGE_TARGET_HIGH 3500
#define FIRST_STAGE_TARGET_LOW 3000
#define FIRST_STAGE_TARGET_HIGH_FINE 4096
#define FIRST_STAGE_TARGET_LOW_FINE 2500
#define FIRST_STAGE_STEP 5
#define FIRST_STAGE_FINE_STEP 1
#define Motor_ON() P2OUT |= BIT2//
#define Motor_OFF() P2OUT &=~BIT2//
#define Valve_ON() P2OUT |= BIT3//
#define Valve_OFF() P2OUT &=~BIT3//
enum scope_type_e
{
SCOPE_TYPE_OFF = 0
SCOPE_TYPE_HEART_SIGNALS
SCOPE_TYPE_RAW_SIGNALS
SCOPE_TYPE_LED_DRIVE
};
int scope_type = SCOPE_TYPE_HEART_SIGNALS;
int i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-12-07 17:00 Blood pressure monitor program\
目录 0 2012-12-13 17:22 Blood pressure monitor program\生命三合一软件\
目录 0 2012-12-07 17:00 Blood pressure monitor program\生命三合一软件\Debug\
目录 0 2010-11-28 10:08 Blood pressure monitor program\生命三合一软件\Debug\Exe\
文件 47357 2011-03-10 10:58 Blood pressure monitor program\生命三合一软件\Debug\Exe\TrineLife.d43
目录 0 2010-11-28 10:08 Blood pressure monitor program\生命三合一软件\Debug\List\
文件 91720 2011-03-10 10:58 Blood pressure monitor program\生命三合一软件\Debug\List\TrineLife.map
目录 0 2012-12-13 17:21 Blood pressure monitor program\生命三合一软件\Debug\Obj\
文件 187 2012-12-13 17:21 Blood pressure monitor program\生命三合一软件\Debug\Obj\TrineLife.pbd
文件 59216 2010-11-28 10:19 Blood pressure monitor program\生命三合一软件\Debug\Obj\blood_pressure.r43
文件 29546 2010-12-05 14:10 Blood pressure monitor program\生命三合一软件\Debug\Obj\blood_pressure_trine.r43
文件 158542 2011-03-10 10:58 Blood pressure monitor program\生命三合一软件\Debug\Obj\main.r43
文件 2250 2010-11-28 10:14 Blood pressure monitor program\生命三合一软件\Debug\Obj\mul.r43
文件 87079 2010-11-28 10:14 Blood pressure monitor program\生命三合一软件\Debug\Obj\oximeter_ext_probe_wxy.r43
文件 84927 2010-11-28 16:42 Blood pressure monitor program\生命三合一软件\Debug\Obj\oximeter_trine.r43
文件 7789 2011-01-24 16:21 Blood pressure monitor program\生命三合一软件\EKG_trine.c
文件 5415 2012-12-13 17:40 Blood pressure monitor program\生命三合一软件\TrineLife.dep
文件 17847 2012-12-13 17:40 Blood pressure monitor program\生命三合一软件\TrineLife.ewd
文件 47600 2012-12-13 17:40 Blood pressure monitor program\生命三合一软件\TrineLife.ewp
文件 163 2010-11-28 10:14 Blood pressure monitor program\生命三合一软件\TrineLife.eww
文件 17653 2010-07-03 21:50 Blood pressure monitor program\生命三合一软件\blood_pressure.c
文件 7656 2011-03-10 10:58 Blood pressure monitor program\生命三合一软件\blood_pressure_trine.c
文件 15687 2011-03-10 10:23 Blood pressure monitor program\生命三合一软件\main.c
文件 3700 2008-11-11 14:35 Blood pressure monitor program\生命三合一软件\mul.s43
文件 31502 2010-11-28 11:27 Blood pressure monitor program\生命三合一软件\oximeter_ext_probe_wxy.c
文件 24469 2011-01-22 20:48 Blood pressure monitor program\生命三合一软件\oximeter_trine.c
目录 0 2012-12-07 17:00 Blood pressure monitor program\生命三合一软件\settings\
文件 2560 2012-12-13 17:21 Blood pressure monitor program\生命三合一软件\settings\TrineLife.cspy.bat
文件 8348 2012-12-13 17:40 Blood pressure monitor program\生命三合一软件\settings\TrineLife.dbgdt
文件 1196 2012-12-13 17:40 Blood pressure monitor program\生命三合一软件\settings\TrineLife.dni
文件 3419 2012-12-13 17:40 Blood pressure monitor program\生命三合一软件\settings\TrineLife.wsdt
............此处省略1个文件信息
- 上一篇:STM32F103串口DMA接收
- 下一篇:国嵌嵌入式全套课程(含收费版)
评论
共有 条评论