Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
hai firends,
i am doing a spectrum analysis project in c6713b and i wish to take
data from a dat file
i tried like this
dat: .include"realdat.dat"
and it is not working
any other command like this available ?
can i do like this in c program for processor?
--
regards,
Joshy m. Jose
kerala , India
91-9447976001
Try fopen("realdat.dat","r") C command...
Harris
hai firends,
> i am doing a spectrum analysis project in c6713b and i wish to take
>data from a dat file
>i tried like this
>dat: .include"realdat.dat"
>
>and it is not working
>any other command like this available ?
>
>can i do like this in c program for processor?
>--
> regards,
> Joshy m. Jose
> kerala , India
> 91-9447976001
Harris,
This a part of some code I used to open (create) a new empty *.h file, read short FIR
coefficients , rescale them and then
save the new results in the h file:
f1 = fopen ("coefficients.h", "w");
fprintf (f1, "short coef[32] = { \n");
for (j=0;j<4;j++){
fprintf (f1, "%d, %d, %d, %d, %d, %d, %d, %d, \n", coef[8*j]*32767/8752,\
coef[8*j+1]*32767/8752,\
coef[8*j+2]*32767/8752,\
coef[8*j+3]*32767/8752,\
coef[8*j+4]*32767/8752,\
coef[8*j+5]*32767/8752,\
coef[8*j+6]*32767/8752,\
coef[8*j+7]*32767/8752);
};
fprintf (f1, "}; \n");
fclose (f1);
All you have to do is change .h to .dat and it should work, Ive tried it myself.
I suspect you dont have the required libraries included. Try rts6713, stdio.h and ..that should
be it.
Let us know i if it worked ;)
Nicolas
----- Original Message -----
From: a...@yahoo.gr
To: c...@yahoogroups.com
Sent: Tuesday, January 30, 2007 1:26 AM
Subject: [c6x] Re: reading data from a .dat file
Try fopen("realdat.dat","r") C command...
Harris
hai firends,
> i am doing a spectrum analysis project in c6713b and i wish to take
>data from a dat file
>i tried like this
>dat: .include"realdat.dat"
>
>and it is not working
>any other command like this available ?
>
>can i do like this in c program for processor?
>--
> regards,
> Joshy m. Jose
> kerala , India
> 91-9447976001
>
>
Joshy,
This a part of some code I used to open (create) a new empty *.h file, read short FIR
coefficients , rescale them and then
save the new results in the h file:
f1 = fopen ("coefficients.h", "w");
fprintf (f1, "short coef[32] = { \n");
for (j=0;j<4;j++){
fprintf (f1, "%d, %d, %d, %d, %d, %d, %d, %d, \n", coef[8*j]*32767/8752,\
coef[8*j+1]*32767/8752,\
coef[8*j+2]*32767/8752,\
coef[8*j+3]*32767/8752,\
coef[8*j+4]*32767/8752,\
coef[8*j+5]*32767/8752,\
coef[8*j+6]*32767/8752,\
coef[8*j+7]*32767/8752);
};
fprintf (f1, "}; \n");
fclose (f1);
All you have to do is change .h to .dat and it should work, Ive tried it myself.
I suspect you dont have the required libraries included. Try rts6713, stdio.h and ..that should
be it.
Let us know i if it worked ;)
Nicolas
----- Original Message -----
From: joshy jose
To: c...@yahoogroups.com
Sent: Monday, January 29, 2007 2:40 PM
Subject: [c6x] reading data from a .dat file
hai firends,
i am doing a spectrum analysis project in c6713b and i wish to take
data from a dat file
i tried like this
dat: .include"realdat.dat"
and it is not working
any other command like this available ?
can i do like this in c program for processor?
--
regards,
Joshy m. Jose
kerala , India
91-9447976001