read from a .txt file

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
bmfs
Newbie
Posts: 8
Joined: Fri Jan 23, 2009 2:40 pm

read from a .txt file

Post by bmfs » Wed Jan 28, 2009 2:35 pm

What I am trying to do is to implement a algorithm to process data.
This algorithm (on dsPIC) waits for data to be available. The data must be sent by another algorithm that reads from a .txt file and sends an integer every time one is read.

The implementation of the first algorithm to the dsPIC shouldn\'t be a problem. But how can I implement the algorithm to read from a file and generate interrupts every time I have some data to send?

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re:read from a .txt file

Post by paolo.gai » Wed Jan 28, 2009 2:45 pm

I suppose the second algorithm stays on the PC (there is no file system in erika!)

everything depends on the connection between the PC (which reads the txt file) and the FLEX board.

- if you want to use the RS232, you can send the data using a serial cable, and on the dspic you can use the serial demo shipped with EE 143

- if you want to use Ethernet, you can start from the example published on the application note section, the one made by Nino with serial line and ethernet.

If you can wait some time, soon we will release EE 1.5.0, which will have a small console library, as well as a bi-directional USB (Francesco Esposito is working on that).

Ciao!

PJ

Post Reply