Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 9th March 2007, 03:40 AM   (permalink)
Default which code and compiler for usb?

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.
__________________
Reality
cyb0rg777 is offline  
Old 9th March 2007, 04:10 AM   (permalink)
Default

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.
__________________
--- The days of the digital watch are numbered. ---
kchriste is offline  
Old 9th March 2007, 04:24 AM   (permalink)
Default

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?

http://www.cs.virginia.edu/~lcc-win32/

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.
__________________
Reality
cyb0rg777 is offline  
Old 9th March 2007, 04:25 AM   (permalink)
Default

There's an automatic USB code generator for PICs EasyHID, not free though.
http://www.mecanique.co.uk/products/usb/easyhid.html
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 9th March 2007, 04:54 AM   (permalink)
Default

You may find the USB Wacker 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

or buy one from SparkFun
http://www.sparkfun.com/commerce/images/Main-UBW.jpg
for $25US.


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.
3v0 is offline  
Old 9th March 2007, 05:21 AM   (permalink)
Default

Quote:
So you are saying the c18 compiler will do what I want?
Yes.
Quote:
Do you mean this LCC win32 compiler?
http://www.cs.virginia.edu/~lcc-win32/
Yes.
Quote:
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.
Quote:
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.
__________________
--- The days of the digital watch are numbered. ---
kchriste is offline  
Old 9th March 2007, 12:31 PM   (permalink)
Default

Thanks for all your replies. I think I will go ahead and install the c18 then.
__________________
Reality
cyb0rg777 is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
C compiler leonel Micro Controllers 10 20th December 2006 02:46 AM
Code "Tab Stripper" Program Mike, K8LH Micro Controllers 8 30th September 2006 12:18 AM
Question about the PIC chip lineup mramos1 Micro Controllers 23 31st May 2006 08:51 AM
Programming PIC16F877 using cc5x compiler Hellsyn Micro Controllers 3 27th April 2006 09:10 AM
AT89C4051 assembly code compiler question fiveten Micro Controllers 5 26th March 2006 07:37 PM



All times are GMT. The time now is 07:55 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker