I need to design a board which should send data to a computer via USB.
The data is composed of a packet of about 25/30 bytes sent every 10 ms.
A software running on the PC side should receive this information and
store it on a file.
I'm wondering if it's better to use an FTDI chip and make the things
easy using a virtual COM port or to implement a "true" USB communication
(HID?).
I'm afraid about the speed needed to receive and save the string into a
file.
What do you recommend?
Marco
30 bytes means 300 bits, (x 10 because 1 start -, 8 data - , and 1 stop bit added).
100 x per second makes = 30000 bps.
Standard baudrates above that are 38400, 57600, or 115200.
If you use 115200 Bd you should be fine with a serial to USB converter, if I did the math right.
Tim
--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms
"Marco Trapanese" <marcotrapa...@gmail.com> wrote in message
news:i9fm0i$si6$1...@tdi.cu.mi.it...
What makes you think that a virtual COM port with an FTDI chip is not
"true" USB communication?
HID is a USB class, and makes sense if you are making a mouse or a
keyboard, or something that will act like a mouse or keyboard. It
certainly does not sound like that's what you are doing.
A virtual COM port (using FTDI chips, or some other kind) is almost
certainly the easiest solution. You can pretend the FTDI chip is just
an RS-232 driver - you connect to it with a UART, and at the other end
you've got a new comms port on the computer. It works with any system
(plug and play on Linux, or by installing FTDI's drivers on Windows),
and you can use a whole range of baud rates up to about 3 MBaud.
"Marco Trapanese" <marcotrapa...@gmail.com> wrote in message
news:i9fm0i$si6$1...@tdi.cu.mi.it...
FTDI chip, Then you don't need a PID and VID since its in the FTDI
already.
<http://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_101_Customising_FTDI_VID_PID_In_Linux(FT_000081).pdf>
Cheers
> What makes you think that a virtual COM port with an FTDI chip is not
> "true" USB communication?
The "other end". On the pc side if I use a virtual COM port I need to
receive data from it.
I was thinking that a custom driver that get data directly from a USB
class could be faster.
> HID is a USB class, and makes sense if you are making a mouse or a
> keyboard, or something that will act like a mouse or keyboard. It
> certainly does not sound like that's what you are doing.
You're right. I used HID to make my own joystick controller, but I saw
people that use HID to exchange data.
> A virtual COM port (using FTDI chips, or some other kind) is almost
> certainly the easiest solution. You can pretend the FTDI chip is just an
> RS-232 driver - you connect to it with a UART, and at the other end
> you've got a new comms port on the computer. It works with any system
> (plug and play on Linux, or by installing FTDI's drivers on Windows),
> and you can use a whole range of baud rates up to about 3 MBaud.
Ok, I got it.
I thank all other guys who answered me.
Marco
> http://www.obdev.at/products/vusb/index.html
*Very* interesting!
Thanks!
Marco
You can talk directly to the FTDI driver you don't have to use it as
a virtual comport.
and you data rate is extremely slow for usb, a few 100 times faster
shouldn't
be problem even for a virtual comport
>
> > HID is a USB class, and makes sense if you are making a mouse or a
> > keyboard, or something that will act like a mouse or keyboard. It
> > certainly does not sound like that's what you are doing.
>
> You're right. I used HID to make my own joystick controller, but I saw
> people that use HID to exchange data.
I think that is mostly to avoid the need for a driver
>
> > A virtual COM port (using FTDI chips, or some other kind) is almost
> > certainly the easiest solution. You can pretend the FTDI chip is just an
> > RS-232 driver - you connect to it with a UART, and at the other end
> > you've got a new comms port on the computer. It works with any system
> > (plug and play on Linux, or by installing FTDI's drivers on Windows),
> > and you can use a whole range of baud rates up to about 3 MBaud.
>
> Ok, I got it.
> I thank all other guys who answered me.
>
> Marco
-Lasse
It probably make more sense to implement it as USB Mass Storage
Device, with or without file system encoded.
Since you are storing data as a file and the PC reading data as a
file, it should be a file storage device.