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.

which code and compiler for usb?

Status
Not open for further replies.

cyb0rg777

New Member
I want to do a usb chip for an 18f2550 or 18f4550. I'm pretty sure you have to use c.
Just to save me some time and agravation.

Is there a free compiler for the code I need for this device?
I know there are limited trial versions ,but I need to know if any of them will do what I need.

Spank you very much.
 
For the 18F series PIC, MicroChip provides a free student edition compiler. The only thing that happens after the "trial period" is that some of the speed / code optimizations are disabled but your code will still compile OK.
For the PC USB client code, I successfully used the LCC Win32 compiler.
 
So you are saying the c18 compiler will do what I want?
But You use the LCC win32 compiler.
Do you mean this LCC win32 compiler?

**broken link removed**

You mean for the PC,as in the usb driver on your PC?
And the c18 for the chip ,right?
How will losing these optimizations affect my device on this application.
Will the code still compile?
I just hate installing strange software.
 
You may find the **broken link removed** useful as a place to start. It is an PIC18F and a USB port. It will help you understand the hardware/software and can be used as an early target board.

You can find the info to build one at the above link
**broken link removed**
or buy one from SparkFun
**broken link removed**
for $25US.
**broken link removed**

The sparkfun UBW comes with a 18F2455 which has 24K of flash, the 18F2550 is the same chip with 32K flash. You can use either in a DIY version.
 
So you are saying the c18 compiler will do what I want?
Yes. :)
Do you mean this LCC win32 compiler?
**broken link removed**
Yes.
You mean for the PC,as in the usb driver on your PC?
MicroChip gives you a pre-compiled USB driver and some example code of a client that calls the USB driver. It is the client code that I used LCC to modify and recompile. I downloaded the schematic and code for the 18f4550 evaluation board from MicroChips site. I used the 18F2550 instead and modified the code/schematic slightly to make it work with the smaller 28pin dip chip. It was a fun learning experience as I'd never done anything with USB before.
How will losing these optimizations affect my device on this application.
It may make it slightly slower by 5% or so, but it shouldn't matter unless you are really trying to squeeze every last bit of performance out of it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top