CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC, CCS, USB & driver. Could anyone give an overview?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PIC, CCS, USB & driver. Could anyone give an overview?
PostPosted: Tue Aug 09, 2005 10:22 am     Reply with quote

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

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Tue Aug 09, 2005 9:29 pm     Reply with quote

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.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en021940&part=DM163025&link=devtoolimg
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Aug 09, 2005 11:39 pm     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Aug 10, 2005 2:09 pm     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Aug 10, 2005 2:20 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Aug 10, 2005 3:41 pm     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Aug 10, 2005 4:22 pm     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Thu Aug 11, 2005 7:00 am     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Thu Aug 11, 2005 2:18 pm     Reply with quote

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


Come to think of it, a well done USB-to-5V-serial cable could be a product by itself...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group