Reply by John Sampson October 2, 20042004-10-02
peter@mir.knu.ac.kr (peter@mir.knu.ac.kr) wrote in message news:<940eac6b.0409302215.663fec46@posting.google.com>...
> I have designed a FIR filter by Matlab, and saved the filer > coefficients as a data file. > I want to utilize these coefficients on 6711DSK board to do some > calculation. > But when I load the coefficient data file to CCS,CCS showed the > data file can not be open. > I don't know why > I am always expecting your answer. > > > 3x
CCS for the '54X has a specific text format that it expects the data to be arranged in. The first line must contain a magic number and a length, if I remember correctly. The format is the same as what you get in saving memory to a file. It should be documented in the online help. Alternatively, you can write a simple m-file to write out a .c file that declares an intialized array, and add that file to your project. I always use this method. Here is some sample matlab code: function stat = csave(c,vname,hdr1,hdr2,fname) format long; fid = fopen(fname,'wt'); fprintf(fid,hdr1); fprintf(fid,'\n\n'); fprintf(fid,hdr2); fprintf(fid,sprintf('\n\n#define\tN%s\t%d\n',upper(vname),length(c))); fprintf(fid,sprintf('\nconst WORD %s[N%s] = {\n',vname,upper(vname))); for m=1:(length(c)-1) fprintf(fid,'\t%d,\n',c(m)); end fprintf(fid,'\t%d\n',c(end)); % no comma fprintf(fid,'};\n'); stat=fclose(fid); return Hope this is helpful. John
Reply by pete...@mir.knu.ac.kr October 1, 20042004-10-01
I have designed a FIR filter by Matlab, and saved the filer
coefficients as a data file.
   I want to utilize these coefficients on 6711DSK board to do some
calculation.
   But when I load the coefficient data file to CCS,CCS showed the
data file can not be open.
   I don't know why 
   I am always expecting your answer.


3x