As the title suggests, has anyone got a project for USB CDC on an 18F14K50? I'm hoping to find the minimum code required to echo a character from a terminal program on a PC using CDC. I've tried a few times over the last five or six years to get one or another of the USB PICs up and running but "no joy". The closest I've come is trying the open source 18F2550 "echo demo" from Dangerousprototypes, which I got to compile but apparently there was a missing file that prevented my Windows laptop from getting a needed driver of some sort. Ian was absolutely no help and I realized a USB newbie like me was not the target for that particular project. I have MPLAB and MPLAB X with the companion XC compilers.
You can download and install Microchip's solution. It's rather convoluted code but will work with the 14K50. I intend to create a logger that will appear as a thumb drive when I get a little more time.
You can download and install Microchip's solution. It's rather convoluted code but will work with the 14K50. I intend to create a logger that will appear as a thumb drive when I get a little more time.
Microchip has an application library. I remember I downloaded it once. It didn't have an installer, just zip. It has various USB examples, CDC being one of them. It's written in C. I've never tried it. I suppose if you searh Microchip's web site for "Application Library" you will find it.
Microchip has an application library. I remember I downloaded it once. It didn't have an installer, just zip. It has various USB examples, CDC being one of them. It's written in C. I've never tried it. I suppose if you searh Microchip's web site for "Application Library" you will find it.
and is for this device - although it's written in Firewing BASIC and not "C". However, it does included the CDC *.inf file which windows needs to install the necessary driver, which may help you. If you want to build the source code, you can download the free Firewing compiler here:
Make sure you download the latest BETA. The compiler will also build for PIC24 and PIC32. Just make sure you select the correct 8, 16 or 32 bit toolsuite from the application toolbar. It defaults to PIC24 (16 bit) so you will need to change to "Firewing 08" before building the usb sample code. Using the CDC library is pretty easy. To read a byte use