本设计应用高精度的仪表放大器INA128组成放大电路对心电信号进行放大,采用有源滤波电路和数字滤波等技术对心电波形进行综合处理
附件中有大部分的硬件电路
部分程序设计如下,如需整个工程文件请跟我联系。
int main(void)
{
u8 x=0,y=0,i=0;
u16 all=0,adcy=0;
float temp;
Stm32_Clock_Init(9);//系统时钟设置
delay_init(72); //延时初始化
uart_init(72,9600); //串口1初始化
GPIO_Configuration();
Adc_Init();
LCD_Init();
LCD_Clear(BLUE);
POINT_COLOR=RED;
BACK_COLOR=BLUE;
GUI_Chinese(80,30,"心电图仪",BRRED,BLUE);
LCD_DrawLine(10, 190, 220, 190);
LCD_ShowString(220,182,">");
LCD_DrawLine(50,60,50,210);
LCD_ShowString(46,50,"^");
LCD_ShowString(28,220,"Wuhan Textile University");
LCD_ShowString(30,245,"2012/07/21");
GUI_Chinese(20,270,"人体心跳分频",RED,BLUE);
LCD_ShowString(120,270,":00.0");
LCD_ShowString(178,270,"Key:");
while(1)
{
adcx=Get_Adc(ADC_CH10);
temp=(float)adcx*(3.3/4096);
adcx=temp*40;
i++;
if(i==10)
{
for(i=10;i>0;i--)
all+=adcx[i-1];
adcy=all/10;
all=0;
right_shift(adcy,valuable);
x++;
if(x==80)
{
x=0;
LCD_Fill(0,80,239,180,BACK_COLOR);
LCD_DrawLine(10, 190, 220, 190);
LCD_ShowString(220,182,">");
LCD_DrawLine(50,60,50,210);
LCD_ShowString(46,50,"^");
for(y=0;y<240;y++)
{
LCD_DrawPoint(y,180-valuable[y]);
LCD_DrawPoint(y,179-valuable[y]);
}
}
checkkey();
LCD_ShowNum(210,270,keyvalue,2,16); //读取键盘值
}
delay_ms(1);
}
}
496211350_338832589 2013-9-24 16:10
southcreek 2013-9-23 17:35