Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

USB: FTDI chip or HID?

423 views
Skip to first unread message

Marco Trapanese

unread,
Oct 17, 2010, 4:23:47 PM10/17/10
to
Hello,

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

Jan Panteltje

unread,
Oct 17, 2010, 5:03:53 PM10/17/10
to
On a sunny day (Sun, 17 Oct 2010 22:23:47 +0200) it happened Marco Trapanese
<marcotrapa...@gmail.com> wrote in <i9fm0i$si6$1...@tdi.cu.mi.it>:

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 Williams

unread,
Oct 17, 2010, 5:43:13 PM10/17/10
to
http://www.obdev.at/products/vusb/index.html

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...

David Brown

unread,
Oct 17, 2010, 5:57:32 PM10/17/10
to
On 17/10/10 22:23, Marco Trapanese wrote:
> Hello,
>
> 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?).
>

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.

Martin Riddle

unread,
Oct 17, 2010, 6:28:31 PM10/17/10
to

"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


Marco Trapanese

unread,
Oct 18, 2010, 4:48:27 AM10/18/10
to
Il 17/10/2010 23:57, David Brown ha scritto:

> 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

Marco Trapanese

unread,
Oct 18, 2010, 4:50:12 AM10/18/10
to
Il 17/10/2010 23:43, Tim Williams ha scritto:

> http://www.obdev.at/products/vusb/index.html


*Very* interesting!

Thanks!
Marco

lang...@fonz.dk

unread,
Oct 18, 2010, 12:13:13 PM10/18/10
to
On 18 Okt., 10:48, Marco Trapanese <marcotrapaneseNOS...@gmail.com>
wrote:

> Il 17/10/2010 23:57, David Brown ha scritto:
>
> > 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.

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

Jamie

unread,
Oct 18, 2010, 7:16:12 PM10/18/10
to

linnix

unread,
Oct 18, 2010, 10:29:22 PM10/18/10
to
On Oct 18, 1:48 am, Marco Trapanese <marcotrapaneseNOS...@gmail.com>
wrote:

> Il 17/10/2010 23:57, David Brown ha scritto:
>
> > 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.

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.

0 new messages