- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I wanted to send a matlab data file (.mat) to the psoc flash periodically via USB.
So i wanted to ask where to start? How would I convert the .mat file to an acceptable transfer file type?
Regards
Masab
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the transmission of data you may use the USBUART on the PSoC side and an emulated serial interface (COMn:) on the PC-side.
Storing data in flash can be done with the emulated EEProm usermodule (latest Creator update!).
The question I have is: What do you intend to do with the matlab-file on the PSoC?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This just depends on what you want to do with this data file. Since my crystal ball is still in repair and you didn't tell us about your project, I would guess that a CSV file might be the simplest solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Forgot to mention that Matlab can write CSV directly: www.mathworks.com/help/matlab/ref/csvwrite.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@HLI, what about of creating a CBRC (Crystal Ball Repair Center, I would be in the boat!
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure, as long as I don't need to promise any success with the repairs 🙂 I will only promise that it will be expensive...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many thanks for the reply
I actually wanted to transmit a large speech signal from a converted matlab data file (about 3Mb in size) onto the PSOC EEPROM, with the data being overwritten to the EEPROM after it gets full (like a runtime acquisition of data using a FIFO). I'm using the CY8C001 kit.
i need to send the matlab file from the PSOC to an FPGA.
Will i have to write a seperate program on my PC to send this data?
Regards
Masab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Depending on the sample rate of the wave file you can get away witrh not needing a special program on the PC side. Using an UART would give you about 10 kbytes/second transfer rate, using an USBUART gives you at most 100kbytes per second.
Both can be used with any program on the PC side being able to write to a serial port. For a wav file, I would suggest really generating one from the MatLab file, and then decode it on the PSoC side. Or maybe you extract the pure waveform stuff, and send just this over, in binary form (to save bandwidth).
Can you explain a little bit more what this project is about?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I actually wanted to stream neural signals (stored in my matlab data files) to the PSoC, real time would be better. These signals have been sampled at 20Kb/sec.
I dont have a serial port in my PC, so i wanted to do it using the USB port.
I then have to transmit these stored samples serially from the PSoC to an FPGA, on which the processing will be done. I'm not transmitting the samples directly to the FPGA because the transmission wouldnt remain synchornous.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A PSoC3 (looking at e.g. CY8C3866AXI-040) as 8kb of RAM, so it will be able to hold about 1/10th of a second worth of data in memory. It has up to 64kb of Flash, this would be up to 3 seconds of data.
So we are talking about continous data transfer here. If the PSoC has no other tasks, it would be just work as an USB pridge. In that case, using a specialized one might be better. Lokk at the FT232 chips (and their newer counterparts). Or e.g. the MCP2210 which is a USB-to-SPI bridge (which might make the FPGA part simpler).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Silly me to forget about the Cypress parts 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At 20 Kb/s, read 2.5 KB/s, seems like no shortage of ways to do this.
Serial one wire could do this 🙂
USB > PSOC > One wire/SPI/I2C/RS232/RS485/LVDS...........
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, communication between the PSOC and an FPGA is no problem.
But i have to do this using the PSOC3 on the CY8C001 kit only. So i only have to write the data to the USB serially, then read it on the PSOC using USBUART functions?
Also, does matlab write directly to a USB port?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes to both.
This might help.
http://forums.ni.com/t5/Multifunction-DAQ/simultaneous-input-output-USB-Daq-in-Matlab/td-p/681206
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
can any one help me, will matlab generate a c code automatically for a psoc embedded core?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, No matlab does not create a C code for PSoC. You need to use PSoC Creator IDE to write code for PSoC.