View previous topic :: View next topic |
Author |
Message |
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
PIC, CCS, USB & driver. Could anyone give an overview? |
Posted: Tue Aug 09, 2005 10:22 am |
|
|
Colleagues,
A while ago I had a project, where PIC was talking to the PC via USB via FTDI chip. The only reason I used FTDI chip was that it came with a driver. It looks like the FTDI chip is just a "license" for the FTDI USB driver implemented in hardware. No problem with that, though: it's well-working system, and I'm willing pay for that. But I had problems fitting the USB interface onto my little board.
So my question is. Is there a Windows USB driver for the PIC itself? Is it good? Is it overall better then FTDI?
Thank you,
Kender |
|
|
MikeValencia
Joined: 04 Aug 2004 Posts: 238 Location: Chicago
|
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Tue Aug 09, 2005 11:39 pm |
|
|
Quote: | It looks like the FTDI chip is just a "license" for the FTDI USB driver implemented in hardware. |
Funny expression. The FTDI chip provides a simple interface between the USB protocol stack running on the host controller system and (in this case) the PIC. You do not need to be concerned with any (ok almost any) issues associated with the USB stack in order to use the FTDI chip. FTDI also provide a Virtual Comm Port driver which means that most legancy PC applications developed to commuicate over a serial (typically RS232) interface will run unchanged. If you already have tools to develop serial comms applications on the PC then you can use these same tools with FTDI implementations and the virtual comm port driver.
Alternatively you could use the "native" FTDI driver instead of the virtual comm port driver but then you cannot use exisitng applications that are not USB aware.
The FTDI chip hides the complexity of USB from the developer. Using this chip (or equivalent produts from other vendors) you only need to process data plane traffic. Similarly, because FTDI provides the windows drivers for you, and these drivers are supplied with Windows, you do not need to be concerned with driver support.
Contrast this with the USB interface in the PIC. Here the PIC does all the work. The PIC (your code) is responsible for both control and data plane traffic between the USB port and the host. There is a lot more work to do, and a lot more PIC resources are required. The developer (using the PIC driver code supplied by CCS and or Microchip) is responsible for ensuring compliance with the USB protocol. Microchip provide a HID driver for the Windows end but it does not provide a virtual comm port driver for the USB PICs (or if they do I never found it) - so driver development (and more specifically driver maintenance) becomes the developers problem.
The time to market using a FTDI (or similar) solution is significantly shorter that a USB PIC implementation. I had my first project with FDTI running in a day.
My suggestion (for a low volume project) is build a bigger PCB :-) _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Wed Aug 10, 2005 2:09 pm |
|
|
MikeValencia wrote: | Look at Microchip's website under the "PICDEM Full Speed USB" development tool. Microchip offers several files, i believe with Windows-based source code too, that you can compile.
|
Thanks. Found the driver. Found also some code in the Code Library, which should work with that driver. On to experimentation...
Kender |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Wed Aug 10, 2005 2:20 pm |
|
|
asmallri wrote: | Quote: | It looks like the FTDI chip is just a "license" for the FTDI USB driver implemented in hardware. |
Funny expression. |
Well, yes, it was a deliberate exageration. In this case I tried to be humorous, and I apologize if I ended up being abrasive. Just like in your case, the FTDI chip worked right away in my case, never caused any trouble, and was well worth the money (and the board space too).
asmallri wrote: | My suggestion (for a low volume project) is build a bigger PCB :-) |
I wish I could. This time I'm making a piece of instrumentation for a remote-controlled aircraft, where space is a great premium (a different meaning of low volume). My board is 2 sq in. So, I'm trying to shave off as many components as possible. |
|
|
sseidman
Joined: 14 Mar 2005 Posts: 159
|
|
Posted: Wed Aug 10, 2005 3:41 pm |
|
|
What about putting the ftdi on a daughterboard that plugs in while not airborne? This would work unless you need usb in the air (for a camera, maybe?)
Also, if you're using DIP packages, move on to something smaller. If you use SMD's for the PIC and FTDI, you might be able to put one chip on the front and one on the back of your board. I find the 44 pin tfqp (common package for the bigger PICs) ok to hand solder. Most of the medium pics come in SOIC packages. You can check the pitch and compare it to the tfqp to try to figure out if you can hand solder it. |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Wed Aug 10, 2005 4:22 pm |
|
|
sseidman wrote: | What about putting the ftdi on a daughterboard that plugs in while not airborne? |
Yes, it is certainly an option to resort to. However, in this case the user will have a custom cable, which he can loose. |
|
|
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Thu Aug 11, 2005 7:00 am |
|
|
kender wrote: | sseidman wrote: | What about putting the ftdi on a daughterboard that plugs in while not airborne? |
Yes, it is certainly an option to resort to. However, in this case the user will have a custom cable, which he can loose. |
Which means you can SELL a replacement... _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Thu Aug 11, 2005 2:18 pm |
|
|
rwyoung wrote: | kender wrote: | sseidman wrote: | What about putting the ftdi on a daughterboard that plugs in while not airborne? |
Yes, it is certainly an option to resort to. However, in this case the user will have a custom cable, which he can loose. |
Which means you can SELL a replacement... |
Come to think of it, a well done USB-to-5V-serial cable could be a product by itself... |
|
|
|