Continue to Site

Welcome to

Welcome to our site! is an international Electronics 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.

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

Not open for further replies.


Newbie level 5
Jun 28, 2010
Reaction score
Trophy points
Activity points
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.


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:

**broken link removed**

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.

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...


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.

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..


If you are dealing with large amounts of data an alternative and more reliable communication technique would be to use TCP/IP
**broken link removed**

there is an ethernet daughter board for the explorer 16
**broken link removed**

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.

Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to