MATLAB Answers

USB interface

9 views (last 30 days)
How we take data from USB device to MATLAB? Actually i am making project in which i have to take data from PIC micro-controller(USB Based Controller) into MATLAB environment..
Any one having any idea for doing so....

Accepted Answer

Image Analyst
Image Analyst on 5 Jun 2011
I use Measurement Computing Devices: but there are others:
Walter Roberson
Walter Roberson on 16 Jun 2011
Define your needs first. How many analog output channels, how many digital output channels? How many bits per sample for the analog channels? What voltage and current ranges do you need for the analog outputs and do you need those to be dynamically selectable? What data rate do you need? What latency? Do you need accurate sample by sample output, or is it okay to push a bunch of samples in to the output buffer and know that after the transport delay they will get rendered one per clock tick? What logical standard do you need for the digital outputs -- TLL? RS232?
Is transferring the samples via RS232 acceptable? Is it a requirement that all data transferred via RS232 be treated as samples, or is it okay to use a mixed data and command environment through the serial port, using something like the modem AT commands to configure the port and then perhaps sending a block saying "threat the next 32 bytes all as samples" ? Or will the port auto-detect AT-type commands, and if so does the port rely upon a particular pause after the AT to signal it is a command AT veras data that just happens to be 'A' 'T' ? If there is no pause or DTR or similar signaling mechanism of commands, then does your sending routine need to scan the output and somehow "encode" values that the command interpreter would otherwise pick up on -- e.g., sometimes modems needed sequences such as AT%NAT\r in order to code that the modem was to pass the actual AT characters to the other end.

Sign in to comment.

More Answers (1)

Walter Roberson
Walter Roberson on 5 Jun 2011
MATLAB does not provide any mechanism to handle general USB devices. It can often talk to USB devices that are emulating a serial port, and it can talk to some USB A/D or D/A devices.
  1 Comment
Arun Sharma
Arun Sharma on 5 Jun 2011
Thanks for the information....

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!