Quote Originally Posted by Darrel Taylor View Post
. If you haven't already ... download and extract the USBDemo from the beginning of this thread.

. Then create a new folder (USBDemo260) and copy the USBDemo.pbp file from Steve's archive into the new folder.
That is the only file that is valid with 2.60, so don't copy any of the others.

. Download the USBDEMOdesc.bas.txt (descriptor) file attached to this post and place it in the same folder. Remove the .txt extension.

. In the USB18 folder, inside your PBP folder ...
Copy the following files to the project ...

usb_dev.asm
usb_dev.inc
usb_hid.asm
usb_hid.inc
usb_mem.asm


. Add this line to the USBDemo.PBP program ... and compile.
Code:
  INCLUDE "USBDEMOdesc.bas"
Darrel, I followed steps you listed explicitly and then tried to compile with PBP 2.6. Got the following error:
" ERROR line 81: Redefinition of VAR. USBDemo.pbp]"
which I don't understand since the UCFG variable is not declared anywhere else in the code...just this line where the code occurs.
The error applies to the statement
"UCFG VAR BYTE EXT ' include UCFG register... Yeah Melabs didn't ("

I went to manual on 2.6 compiler to check syntax of this statement. I guess I don't understand the use of EXT at the end of the statement....manual doesn't explain that.

Can you tell me what might be wrong and why this won't compile?? I would really like to get this USBDemo going for my 18F4550.

Also don't understand why Steve's schematic that you posted varies from the hardware description in the USBDemo260 code:
Here is the Hardware description from the code:
Hardware:
' ---------
' 4 Push Buttons on PORTA<5:2> with pull-down resistors
' 2 Trim pot on PORTA<1:0>
' 8 LEDs attach between PORTB and GND
' 2 LEDs attach to CCP<2:1> pins
' 4 MHZ crystal & all the usual USB stuff
Yet the schematic shows no pushbuttons on PORTA <5:2>, no trim pota on PORTA <1:0>, no LEDS on PORTB or CCP, and a 20 MHz crystal rather than 4 MHz. Can you advise me of the correct hardware hookups for the USBDemo260 code...the schematic or the code description??