Hi,
Does TI have a similar demo application for CDC like they have released for HID devices. I would really appreciate if someone could post that demo application here or can provide me with tips to start to make my demo app for CDC.
Thanks,
A
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
Does TI have a similar demo application for CDC like they have released for HID devices. I would really appreciate if someone could post that demo application here or can provide me with tips to start to make my demo app for CDC.
Thanks,
A
If I remember correctly, they implemented the "Abstract Control Model Serial Emulation" (see this link for more info: www.usb.org/developers/devclass_docs/usbcdc11.pdf).
So basically it is expecting you to use a virtual COM port. TI just uses hyperterminal in their examples. If you want to write PC code to talk to your embedded device, just write some code that opens a serial port.
I am referring to something similat to HID demo app. I ofcourse know about slac285a and that it does not have a CDC demo GUI.
I don't want to use expensive s/w like MAtlab or Labview something which can be used on any cheap PC with not enough computational power. May be somthing that runs on linux. I have no experience of writing such an application somthing like a JAVA API could work but the laptop definttely would not have great computation power.
You don't need Matlab or Labview, just your favorite compiler that can use serial ports. JAVA can probably do it if that's what you prefer. I wrote mine in C/C++. If you like C, GCC is freely available on windows/linux.
Google serial port for your favorite language, or you can order Jan Axelson's Serial Port Complete off amazon.com if you want a more guided approach. You could probably get enough going just by visiting her website.
I actually used C# to write the application which interfaces with my F5528 which is using the CDC api. Using Visual Studio (or even Visual Studio Express) it is very easy to create a simple GUI and read/write to the serial port. I will be providing example software in the next few posts on my blog, but it will use the VCP generated by the LaunchPad or an FTDI chip, the principle is exactly the same though as far as the computer is concerned.
Best of luck,
NJC
___________________________
A,
If you don't mind, could you post your MATLAB code? Some of the things I will be doing in the future are very mathematically complex and I would prefer to implement them in MATLAB. I haven't had a chance yet to see how easy this would be.
Thanks,
NJC
_______________________
http://msp430launchpad.com
Hi NJC,
I have a very simple implementation in matlab and I really don;t have a GUI just simple read and write commands, to best make it suited for real time I would have to use simulink instead or write a simple code.
But anyway here is how I test it,
on my pc it is detected on COM7 for now I set max baud rate =12 Mbps but for usb 2 its 480Mbps
s=serial('COM7','BaudRate',12000000); //Declares serial port connection
fopen(s);//opens serial connection
So I can write one byte data to MSP 430 using fwrite command value we write is treated as decimal not ASCII or something else
fwrite(s,2) will write 2 to COM port
fread(s) would read bytes by default reads 512 you can modify this by setting s.InputBufferSize=xx whatever you require but this has to be done before opening connection
But I prefer letting it be 512 so that I can check if I am receiving required no. of values or more.
You can also specify fread(s,10) to read 10 byte data
Thats about it putting this for a real time application would make sense if you use it in simulink but i don't have the toolbox for that but would have loved to use it
I think its in the Instrumentation Control box Hope that helps
**Attention** This is a public forum