hello, anybody plz tell me how can i transfer a file from pc to TI DSK(c5416). thank u.
data transfer
Started by ●March 26, 2006
Reply by ●March 26, 20062006-03-26
maddy wrote:> hello, anybody plz tell me how can i transfer a file from pc to TI > DSK(c5416). > thank u.You can use the C functions fopen, fread, and fclose to load it. John
Reply by ●March 26, 20062006-03-26
john wrote:> maddy wrote: > > hello, anybody plz tell me how can i transfer a file from pc to TI > > DSK(c5416). > > thank u. > > You can use the C functions fopen, fread, and fclose to load it. > > JohnTo continue with what John says, it is a good custom to load your entire data file onto the dsk memory with only one read. S L
Reply by ●March 27, 20062006-03-27
One more Method. You can convert the file to a .dat file by adding the coff header ( some reading is required to do this ) and then load the file directly to the DSP memory using the File-> Data -> Load option in the code composer studio. Regards, Manja.
Reply by ●April 1, 20062006-04-01
thank u. i still want some ellaboration abt this solution u have given;can this be used to read data file while the code is executing,(as we are reading a big file,a .wav file),and simultaneously play it?
Reply by ●April 1, 20062006-04-01
Reply by ●April 1, 20062006-04-01
maddy wrote:> thank u. > i still want some ellaboration abt this solution u have given;can this > be used to read data file while the code is executing,(as we are > reading a big file,a .wav file),and simultaneously play it?If the .wav file is too large to fit in the memory on your board, then you may have to try to read it in using fread, one block at a time. You might be able to set up a DMA operation to send the current block to the DAC while you read the next block, but be aware that file input from the PC over JTAG can be really slow. Another solution might be to send it from the PC using a COM port. I think it may also be possible to use probe points to load buffers from a file as the DSP code executes, but there could be performance issues with that as well. Yet another idea is to play it on the PC soundcard and sample it using a ADC on your board. John
Reply by ●April 7, 20062006-04-07
thanks John. i tried reading the file using fread.but it is not reading the file at all. we looked for help in the help file for fread,it says: the fread function is defined in the file rts.src and we are finding that this rts.src, when included, has many errors. plz help us.
Reply by ●April 7, 20062006-04-07
maddy wrote:> thanks John. > i tried reading the file using fread.but it is not reading the file at > all. > we looked for help in the help file for fread,it says: > the fread function is defined in the file rts.src > and we are finding that this rts.src, when included, has many errors. > plz help us.You don't want to add rts.src to your project. You want to add rts.lib, the compiled version. Also, put #include <stdio.h> at the top of your file. John
Reply by ●April 7, 20062006-04-07
>thanks John. >i tried reading the file using fread.but it is not reading the file at >all. >we looked for help in the help file for fread,it says: >the fread function is defined in the file rts.src >and we are finding that this rts.src, when included, has many errors. >plz help us. >Hi Maddy, fread will work for reading the .wav file. I have done it before. Include the library file for compilation instead of source file. Also, as John said include cstdio in header, which you would have. Remember, practically the read and transfer from the file will be dead slow. Make full use of DMA. If you are going to benchmark the performance of your program, take care to exclude the reading part since it has nothing to do with your algorithm's performance. - Krishna






