SEARCH
TOOLBOX
LANGUAGES
Register    Login    Forum    Search    FAQ

Board index » Electronics Projects » PIC18F USB development




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [Building USB device] Using 18F4455 instead of 18F4550
 Post Posted: Sat Mar 17, 2012 9:08 pm 
Offline

Joined: Sat Mar 17, 2012 8:06 pm
Posts: 1
Hey Simon

First of Thanks for the tutorial for building a PIC18F USB device.

I build the circuit displayed in this article http://www.waitingforfriday.com/index.php/Building_a_PIC18F_USB_device. I had to use a PIC18F4455 instead of a PIC18F4550 as it was all I had lying around.

Ok so after opening the firmware almost all the files where missing, I linked them all from the C:\Microchip Solutions v2011-07-14\Microchip\USb or INLCUDE directories. Is this right? The only example for a PIC18F4455 only contained the usb.h file.

So after this trying to compile gives me the next error telling me there should be a /USB folder in my project file with all the header files in. I then created the file and added the same files I linked to the missing files.

I proceeded to replace the link file with the link file for the 18F4455 in C:\Microchip Solutions v2011-07-14\USB\Device - Bootloaders\HID\Firmware - PIC18 Non-J\ .I then added the code to the main.c file to allow a 18F4455 pic and added to the linking string in the project option->MPLINK the "/p18f4455" variable. this yielded the following error.

Error -section '. code_usb_device.o' can not fit the section.Section '. code_usb_device.o' length = 0x000013ac

I reverted back to your linking file and changed the lines
Code:
//FILES p18f4550
FILES p18f4455

// And the following line
// CODEPAGE NAME=page START=0x102A END=7FFF
CODEPAGE NAME=page START=0x102A END=5FFF


After this project compiles I load it onto the PIC,verified it and then If I plug it into either my XP or Win7 Computer it doesn't detect the device. I have checked the circuit a few times unless the breadboard is broken it is fine.

I assume I did something wrong with the linking file. Could you please advise on how I can fix this.

Thanks in advance
Overklog


Top 
 Profile  
 
 Post subject: Re: [Building USB device] Using 18F4455 instead of 18F4550
 Post Posted: Sun Mar 18, 2012 7:18 am 
Offline

Joined: Thu Apr 01, 2010 6:23 am
Posts: 889
It's likely that the PIC you are using has a different memory map for the USB RAM than the 4550. You should grab the data-sheets for both devices and compare the map in the USB section. If they are different you need to alter the code to suit your chosen device.


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 2 posts ] 

Board index » Electronics Projects » PIC18F USB development


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
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 post attachments in this forum

Search for:
Jump to:  
cron
Translated by MaĆ«l Soucaze © 2009 phpBB.fr