View previous topic :: View next topic |
Author |
Message |
Ringo42
Joined: 07 May 2004 Posts: 263
|
18f2455 vs 18F46J50 |
Posted: Wed Dec 15, 2010 3:10 pm |
|
|
I have a project that uses a 18f2455. I'm looking for a cheaper part and found 18F46J50. I stuck that in my code to see if it would compile and got a weird message.
*** Error 119 "C:\Program Files\PICC\drivers\pic18_usb.h" Line 187(8,63): Unknown PIC device, USB not supported in this library.
I'm using version 4.085.
I bought the USB dev kit about 3 years ago. Would this error be a compiler version problem or a USB dev kit version problem?
I don't remember if the USB.c, .h etc came with the USB part or just with the compiler.
Any thoughts,
Ringo _________________ Ringo Davis |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19375
|
|
Posted: Thu Dec 16, 2010 3:37 am |
|
|
If you look at the pic_18_usb.h file, you will find that it tests for processor numbers it 'understands'. The version you have predates support for the 46J50 being added.
Since the support needed is basically identical to that for the existing chips you can just change the test line, and tell it to treat the 46J50, as if it was a 2450. Support for this family, was added to these files, May 8th 2009. Probably fairly close to your compiler version.
You get these files, both with the kit, and updated versions with the compiler.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
Ringo42
Joined: 07 May 2004 Posts: 263
|
|
Posted: Thu Dec 16, 2010 3:23 pm |
|
|
I made that change and started getting other errors. Maybe I'll put this project on the back burner until I upgrade my compiler.
Thanks
Ringo _________________ Ringo Davis |
|
![](templates/subSilver/images/spacer.gif) |
|