Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Anyone got working USB CDC code for 18F14K50?

Status
Not open for further replies.

Mike - K8LH

Well-Known Member
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.

TIA. Cheerful regards, Mike
 
Atom has if he is still around Ive used jal with it It has a example
 
Mike,

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.

Have fun,

Mike.
 
Atom has if he is still around Ive used jal with it It has a example

Hola be,

Could you show me where to look at? Gracias.
 
He never posted any code but maybe he will
I used jal it has code to use that chip that works really good
 
Mike,

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.

Have fun,

Mike.

I hesitate to run this installer without knowing what it is, Burt. Is there a page somewhere describing exactly what this download is?
 
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.

I think they are for the cxx compilers.... I know they haven't been ported to XC yet....

I have checked Jason's web site... There seems to be no CDC examples.... All that I could find was HID samples...
 
> got a project for USB CDC on an 18F14K50?

The firmware CDC code used on the Firewing board is open source

https://www.firewing.info/pmwiki.php?n=Firewing.MainBoard#Firmware

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:

https://www.firewing.info/pmwiki.php?n=Firewing.Download

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

Code:
data = Cdc.ReadByte()

and to write a byte use

Code:
Cdc.WriteByte(data)

Hope it helps...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top