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

USB PICs

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







USB PICs
PostPosted: Tue Feb 13, 2007 11:57 am     Reply with quote

I've been using an FTDI chip to communicate with a PIC18F2480 via USB. I was wondering if anyone has experience with the PICs with built in USB. Are there windows drivers for them? How would you go about communicating through usb with a windows program?
ak6dn



Joined: 08 Jan 2006
Posts: 23
Location: Saratoga, CA USA

View user's profile Send private message

Re: USB PICs
PostPosted: Tue Feb 13, 2007 1:49 pm     Reply with quote

Alvin wrote:
I've been using an FTDI chip to communicate with a PIC18F2480 via USB. I was wondering if anyone has experience with the PICs with built in USB. Are there windows drivers for them? How would you go about communicating through usb with a windows program?


I just started to play around with the PIC18F2550 with integrated USB controller in full speed mode (12Mb/s) using the CCS 'CDC' serial port emulator stack. So far it's been working pretty well; the device enumerates properly under WinXP and appears as a COMx serial port, and I've been able to sustain just north of 60KB/s (~600Kbaud) communications from the PC looped thru the PIC.

Look at the EX_USB_SERIALx.c examples in the CCS Examples folder as a starting point, and read the header comments in the driver files (all pulled in thru the usb_cdc.h include reference).

There is no custom driver required on the PC side, only an .inf file that references the standard windows USB serial comport emulator driver. CCS supplies a template .inf file for these examples in their Drivers directory (cdcNTXP.inf IIRC).

If you want to have an interface that is more complicated than a serial port emulation I believe that the CCS USB stack supports that as well; they have several other USB examples. However I believe these will require you to provide a custom driver on the windows side.
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Wed Feb 14, 2007 7:38 am     Reply with quote

Look in the CCS code library. Microchip has a dll you can call from visual basic delphi visual c etc.
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