/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Application conversion from Primer1 to Primer2

Username:     
Password:     
             

Forum

# 1   2010-05-06 22:59:29 Application conversion from Primer1 to Primer2

rfarrow2010
Member
From: FL. USA
Registered: 2010-02-04
Posts: 14

Application conversion from Primer1 to Primer2

I want to thank toni1000 and jingxizhang for a great project in ECGPrimer1.1.

I have built a simple ECG monitoring system using the Primer1 and their ECG program and modified the code to allow it to work in real-time for my application. This required removing the digital filtering code and replacing it with an analog filter on the input of the DAC. I know it's a terrible thing to replace digital with analog but I needed speed.  The display is only required while the unit is acquiring the ECG signal, about 5-10 beats. Then the code turns it off and displays only critical data once per beat. The ADC AWD (analog watchdog) is used to detect the R wave. The SysTick is set to 5msec. On each interrupt the code looks at the AWD to determine if R wave has begun.

Now I want to port the code to a Primer2. Do you have any suggestions on what kind of problems I may face? Are there any examples I could look at?

Thanks
Rob

Offline

 

# 2   2011-01-09 06:35:45 Application conversion from Primer1 to Primer2

10code
New member
Registered: 2010-11-21
Posts: 3

Re: Application conversion from Primer1 to Primer2

Hi rfarrow2010,

Its great job you are doing! Even I am trying to port the application to a STM32F100 Development board. I am facing some issues with the digital filter. Can you please help me.
The development board has 320x240 pixel display. Please give me your skype/gtalk I.
Please mail me on hemanth.tce@gmail.com

Regards,
Hemant

Offline

 

# 3   2011-01-09 16:59:26 Application conversion from Primer1 to Primer2

rfarrow2010
Member
From: FL. USA
Registered: 2010-02-04
Posts: 14

Re: Application conversion from Primer1 to Primer2

I don't think I could help you with the digital filter.  I removed that section of code and replaced it's function with an analog circuit which filters the ECG signal before it enters the Primer.

Rob

Offline

 

# 4   2011-03-04 08:44:56 Application conversion from Primer1 to Primer2

toni1000
New member
Registered: 2008-07-30
Posts: 4

Re: Application conversion from Primer1 to Primer2

Hi rfarrow2010,

To port the code from primer1 to sprimer2 the most important point is configure the DMA device correctly. Maybe the analog port also. And finally select OSCircle correct version.

Are you sure to remove digitals filters? In my opinion you can implement a low order filters (order 2). One notch filter (stop band) to remove interference line and butter (passband) from 0.5-100Hz.
In 32bits filtering it takes few time.

If you want to save time in filters, instead to work with float operations you should work with integer operations. (Take it account that a small error is introduced.)

I design digital filters with matlab, and then I translate it to C code.

Best regards,
Toni.

Last edited by toni1000 (2011-03-04 09:03:33)

Offline

 

Board footer