热度 19
2013-9-22 10:15
1152 次阅读|
2 个评论
本设计应用高精度的仪表放大器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;i0;i--) all+=adcx ; 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;y240;y++) { LCD_DrawPoint(y,180-valuable ); LCD_DrawPoint(y,179-valuable ); } } checkkey(); LCD_ShowNum(210,270,keyvalue,2,16); //读取键盘值 } delay_ms(1); } }