Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

How to read data from a text file containing ECG data onto explorer 16 board

Status
Not open for further replies.

Sahaj007

Newbie level 5
Joined
Jun 28, 2010
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,354
Hello Everybody,
I'm containing a text file that contains ECG data.Can anybody please tell me how i can import this data onto the explorer 16 board using Kerhuel's Simulink model.What are the blocks i need to use in order to import the data efficiently onto dsPIC.Expecting a quick response from any person out there.

Thanks
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,273
Trophy points
1,413
Location
Southwest, USA
Activity points
62,487
I would think you would want to import the data into Matlab and then use that data to help develop your algorithms in Simulink with the Kerhuel's Simulink Blockset?

Once you perfected your algorithms in Matlab you can then translate them into PIC24F code.

Is this not correct?

---------- Post added at 10:05 ---------- Previous post was at 10:01 ----------

You could build a GUI in Matlab as well to simulate the frontpanel display of your prototype ECG unit.

Importing data from a file into Matlab is fairly easy, if you need an example let me know.

---------- Post added at 10:17 ---------- Previous post was at 10:05 ----------

Here is just one of many examples of importing data from a file into Matlab:

Importing Text Data Files

I regularly use textscan() and fscanf(), but there are several other read file commands. Just depends on whether the data is binary or text (ASCII) format.
 

Sahaj007

Newbie level 5
Joined
Jun 28, 2010
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,354
You're right..But is there any way where I can use these blocks available in simulink to read the data from a text file directly onto the explorer 16 board via serial port that comes with the evaluation board,so that the processing can be done on the board and post processing we can plot the values onto the PC...If u could demonstrate with some examples it would be very helpful...

Thanks
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,273
Trophy points
1,413
Location
Southwest, USA
Activity points
62,487
Sure, you can move the data back and forth between the board and PC. You don't need to use Kerhuel's Simulink Blockset to accomplish that task, Matlab has built-in serial port routines. I'll see what I have in the way of examples.
 

Sahaj007

Newbie level 5
Joined
Jun 28, 2010
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,354
Sir,
If u don't mind can u provide me those examples that u were mentioning about in your post,cos I'm in urgent need of those..

Thanks
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,273
Trophy points
1,413
Location
Southwest, USA
Activity points
62,487
Checkout the dsPIC Blockset Setup Examples:

This example use the Explorer 16 Development Board with the dsPIC 33FJ256GP710 or the PIC 24JF128GA010 microcontroller. The model file is in the blockset install directory : examples\dsPIC_33f_Explorer16.mdl

This model, with the dsPIC blockset, do :


Simulink Model for Explorer 16 Board equipped with 33FJ256GP710 or PIC 24FJ128GA010One led blinking at 1Hz (Port A0)
One led (Port A7) :
blinking at 2Hz when the left button is pushed (Port D6)
Switch on or off depending on the position of the potentiometer (Port AN5)
Low pass Filtering sample value from the potentiometer (at 1Hz and 10Hz)
Logging and Plotting with Matlab and in real time the raw and filtered samples from AN5 : Potentiometer
You might as well step through Kerhuel's Simulink Blockset Explorer 16 Setup:

Explorer 16 Board Setup

It demonstrates using the USART to move code and data between Matlab and the Explorer16.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top