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
Re: USB PICs
Posted: Tue Feb 13, 2007 1:49 pm
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
Posted: Wed Feb 14, 2007 7:38 am
Look in the CCS code library. Microchip has a dll you can call from visual basic delphi visual c etc.
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